1 ssh
ssh lnh@deb1 -p 22
2 ssh-keygen
# Create RSA private(`id_rsa`) and public(`id_rsa.pub`) key pair.
ssh-keygen -t rsa
3 scp
# Copy file.
scp 1.txt lnh@deb1:/home/lnh/1.txt
4 ssh-copy-id
# Copy `id_rsa.pub` to `~/.ssh/authorized_keys`.
ssh-copy-id -i id_rsa.pub lnh@deb1
5 sshd_config
/etc/ssh/sshd_config
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys