3

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.

2
  • did you injected the public-key into .ssh/authorized_keys or did you just 'copied it into .ssh'? Commented Jan 10, 2013 at 8:47
  • I injected it into the authorized keys file. Commented Jan 10, 2013 at 8:48

2 Answers 2

2

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.

0

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

1
  • "Setting a new passphrase but leaving it blank" is better known as "removing the passphrase." Your could have also removed the passphrase from your existing key by this method. Commented Aug 4, 2019 at 6:34

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.