0

I continue to get a passphrase prompt with ssh despite already having set up the public key authetnitication on the remote server. I have already in the past done the following:

Local Server

chmod 700 ~/.ssh/
chmod 600 ~/.ssh/id_rsa
eval `ssh-agent`
ssh-add ~/.ssh/id_rsa (enter passphrase here)

Remote Server

Set up a ~/.ssh/authorizedkeys (this is my id_rsa.pub file from my local server)

After disconnecting from my local server and logging back in, I still need to enter my passphrase despite having already added the identity to my key agent. It continues to be prompted.

This is what my config file settings look like as well:

Host *
  User name
  StrictHostKeyChecking no
  PasswordAuthentication no
  AddKeysToAgent yes
  UpdateHostKeys yes
  IdentityFile ~/.ssh/id_rsa
  PubkeyAuthentication yes
  Port 22

Thanks in advanced

  • When you disconnect from your local server, presumably your session is terminated, and along it your instance of ssh-agent. This is expected. – Panki Jul 01 '21 at 10:42
  • Is there any way to keep the ssh-agent running? This is because I need to run automated pipelines running via a job scheduler – Joe_Informatics Jul 01 '21 at 11:38
  • Possibly relating: https://unix.stackexchange.com/q/90853/315749. If ssh-agent is actually killed upon logout, the way to prevent it will likely depend on the operating system and service/session manager you are using on the local system. Can you please edit this information into your question? – fra-san Jul 01 '21 at 12:29
  • Could be permissions: (1) are you the owner of ~/.ssh/id_rsa? (2) are you the owner of ~/.ssh? (3) are you the owner of ~/ and (4) are permissions 750 on ~/? – NoExpert Aug 27 '21 at 23:14

0 Answers0