SSH keys and ~/.ssh/config

If you connect to more than a couple of servers, ~/.ssh/config saves a lot of typing: ssh name instead of a long command.

Host nas
    HostName 192.168.1.20
    User admin
    Port 2222
    IdentityFile ~/.ssh/id_ed25519
ssh-keygen -t ed25519 -C "laptop"
ssh-copy-id nas

Once key login works, disable passwords: set PasswordAuthentication no in /etc/ssh/sshd_config and restart sshd.