This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
deb9:ssh [2022/08/14 18:38] – [Keep Alives] Bernard Condrau | deb9:ssh [2024/11/14 14:01] (current) – [Settings] Bernard Condrau | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== SSH Client and Server ====== | ====== SSH Client and Server ====== | ||
To login to any machine with SSH, you need to install the ssh server. The client is installed on Debian by default. Terminology used is " | To login to any machine with SSH, you need to install the ssh server. The client is installed on Debian by default. Terminology used is " | ||
+ | |||
+ | <color red>Need to update: Iapetus, Pandora</ | ||
===== Linux Server ===== | ===== Linux Server ===== | ||
Line 20: | Line 22: | ||
PrintLastLog yes | PrintLastLog yes | ||
TCPKeepAlive yes</ | TCPKeepAlive yes</ | ||
- | * Restart the SSH server:< | + | * Restart the SSH server:< |
===== Linux Host ===== | ===== Linux Host ===== | ||
Line 43: | Line 45: | ||
* **Save public key** and **Save private key** | * **Save public key** and **Save private key** | ||
- | ===== Keep Alives | + | ===== Access through Relais Hosts ===== |
- | I have machines in a location without fixed IP address, and where external access is only possible through a relais host which disconnects after 2+ minutes of inacitivity. I solve this by adding the following to the sshd_config of each machine which need to be accessed. | + | I have machines in a location without fixed IP address, and where external access is only possible through a relais host. |
- | | + | * Avoid SSH disconnects after inacitivity by adding the following to '' |
- | ClientAliveCountMax 2 | + | ClientAliveCountMax 2</ |
- | Alternatively, | + | |
- | | + | ServerAliveInterval 300 |
- | ServerAliveInterval 300 | + | ServerAliveCountMax 2</ |
- | ServerAliveCountMax 2 | + | * I have restricted SSH access to machines with known IP addresses, so find from where (relais machine) you connect through SSH< |
+ | * Add or modify the restriction to your '' | ||
+ | * See [[deb10: | ||
==== Links ==== | ==== Links ==== | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | * [[https:// | ||
* [[http:// | * [[http:// | ||
+ | ===== Copy file from remote host ===== | ||
+ | * '' | ||
+ | * [[https:// | ||
===== X Client ===== | ===== X Client ===== | ||
==== Debian ==== | ==== Debian ==== |