...
- Generate a public/private key pair following the procedure on ssh key generation
- Copy the public key to the system and user you want to login to, adding it to the user's ~/.ssh/authorized_keys file. If the file does not exist, create it and set the permissions to read and write for the user only (
rw-------
). - For passwordless login as root to work, /etc/ssh/sshd_config on the system you want to login to must have "PermitRootLogin without password". This is bad security practice.
Usage
ssh <username>@<host>
...