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 “Server” for the remote machine to get access to, and “Host” for the local machine which needs access to a server. This guide was updated 8th August 2020.
Need to update: Iapetus, Pandora
apt install ssh
Port 22 LoginGraceTime 20 AuthorizedKeysFile .ssh/authorized_keys PasswordAuthentication no PermitEmptyPasswords no PermitRootLogin without-password
Match Address my.host.subnet.ip PermitRootLogin without-password
X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes
sudo /etc/init.d/ssh restart
ssh-keygen -t ecdsa -b 521
I have machines in a location without fixed IP address, and where external access is only possible through a relais host.
sshd_config
of each machine which need to be accessed.ClientAliveInterval 300 ClientAliveCountMax 2
ssh_config
of each client, or set the keep alive setting in PuTTY.Host * ServerAliveInterval 300 ServerAliveCountMax 2
$ who
authorized_keys
filerestrict,from="aaa.bbb.ccc.ddd,eee.fff/16"
$ rsync -a -e “ssh -p 50922” –info=progress2 bco@192.168.1.13:/home/bco/site-backup/site*.zip /home/bco/
ssh -X <user>@<Xclient> sensible-browser
sensible-browser