This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
deb9:ssh [2020/08/08 16:58] – [Windows Host] 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 12: | Line 14: | ||
PasswordAuthentication no | PasswordAuthentication no | ||
PermitEmptyPasswords no | PermitEmptyPasswords no | ||
- | PermitRootLogin | + | PermitRootLogin |
* If you want to allow ssh root access from a regular user on the same host, or from another host (e.g. BackupPC), add the following lines to the end of sshd_config:< | * If you want to allow ssh root access from a regular user on the same host, or from another host (e.g. BackupPC), add the following lines to the end of sshd_config:< | ||
PermitRootLogin without-password</ | PermitRootLogin without-password</ | ||
Line 20: | Line 22: | ||
PrintLastLog yes | PrintLastLog yes | ||
TCPKeepAlive yes</ | TCPKeepAlive yes</ | ||
- | * Restart the SSH server:< | + | * Restart the SSH server:< |
===== Linux Host ===== | ===== Linux Host ===== | ||
- | * Run ssh-keygen with the following command to generate a key pair.< | + | * Run ssh-keygen with the following command to generate a key pair.< |
* Leave the password empty so you don't need to enter it every time when establishing a connection. Accept the defaults, which puts the generated key pair into ~/.ssh | * Leave the password empty so you don't need to enter it every time when establishing a connection. Accept the defaults, which puts the generated key pair into ~/.ssh | ||
* Copy the public key file (extension .pub) to all servers you need access to, then add the content of the file to the ~/ | * Copy the public key file (extension .pub) to all servers you need access to, then add the content of the file to the ~/ | ||
Line 29: | Line 31: | ||
* Observe permissions, | * Observe permissions, | ||
+ | [[https:// | ||
===== Windows Host ===== | ===== Windows Host ===== | ||
* Install [[https:// | * Install [[https:// | ||
Line 42: | Line 45: | ||
* **Save public key** and **Save private key** | * **Save public key** and **Save private key** | ||
+ | ===== 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. | ||
+ | * Avoid SSH disconnects after inacitivity by adding the following to '' | ||
+ | ClientAliveCountMax 2</ | ||
+ | * Alternatively, | ||
+ | ServerAliveInterval 300 | ||
+ | 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 ==== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[http:// | ||
+ | ===== Copy file from remote host ===== | ||
+ | * '' | ||
+ | * [[https:// | ||
===== X Client ===== | ===== X Client ===== | ||
==== Debian ==== | ==== Debian ==== |