See also Computer Systems at IMADA.
Passwordless SSH Connections¶
To connect to a server through SSH you either need to type your password each time, or set up a public/private key pair. You can read more about public/private keys at https://help.ubuntu.com/community/SSH/OpenSSH/Keys, and a short version below.
On each machine from where you want to log in, do the following once:
If you do not already have a keypair (check
ls .ssh/id_rsa*, if you see.ssh/id_rsaand.ssh/id_rsa.pubthen you have one), runssh-keygenand follow instructions (for security you should add a passphrase so someone copying your private key can not just use it). Note, you should not copy your private key (.ssh/id_rsa) anywhere. Create a new key-pair on each machine.Run
ssh-copy-id yourUsername@the.server.sdu.dk.Attention
If you do this step manually, without
ssh-copy-id, be careful the permisions on the remote.ssh/folder, and its contained files, are correct (only “user” permissions are allowed).Try
ssh yourUsername@the.server.sdu.dk. You should now be able to log in without typing your password.