User Tools

Site Tools


geek:passwordless_ssh

Passwordless SSH

Check if you already have a public key

ls .ssh/id_rsa.pub

If not, generate one

ssh-keygen -t rsa

Make sure the .ssh directory exists on the remote host, then append the key to the authorized_keys file (from the client, to the remote host):

cat .ssh/id_rsa.pub | ssh user@remotehost 'cat >> .ssh/authorized_keys'
geek/passwordless_ssh.txt · Last modified: 2020/04/11 14:22 by admin