I recently generated ssh keys, copying my public key to the server I need access to and keeping my private key in my ~/.ssh/ directory.

Everything works great but ssh prompts me for the passphrase every single time I want to login to the server. I was under the impression that if I am logged in as root and have the private key stored locally in my directory, the passphrase is only needed at first login.

Ideally I would like to access the server seamlessely using no passphrase and just the key, this way I can passwordless rsync and such.

Is this possible? I do remember an option to include a passphrase and typed one in assuming this was most secure. Maybe I shouldn't have.

  • did you injected the public-key into .ssh/authorized_keys or did you just 'copied it into .ssh'? – akira Jan 10 '13 at 8:47
  • I injected it into the authorized keys file. – Scandalist Jan 10 '13 at 8:48

If your private key has a password on it and you only want to have to enter the password once per session, use ssh-agent and ssh-add.


In my case, setting a new passphrase but leaving it blank was the solution. It appears you can cache the passphrase in a file for an extended period of time but I require seamless backups with zero worry.

ssh-keygen -p

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.