You may also like...

  • Stephane Chauveau

    Using a password-less ssh key is generally not a good idea from a security point of view. They should be limited to very specific cases such as services having to access a remote system without the user intervention (e.g. remote backups with rsync, …).

    It is far better to create a key with a passphrase and to use a ssh-agent to remember the passphrase during your whole desktop session. When you start your desktop session, simply use the command ssh-add once to provide the passphrase. After that, ssh connections do not require any passphrase.

    If you are running Gnome, KDE or one of the other popular Linux desktops then it is likely that you already have a shh agent running.

    If you already have a ssh key without a passphrase in private file ~/.ssh/id_rsa then you can add one with the command

    ssh-keygen -p -f ~/.ssh/id_rsa