I'm trying to use a simple version of the ~./ssh/config file, but whenever I try to connect to any host listed in the config I am repeatedly prompted for the ssh key password.

I'm not trying to save the password / use keychain like most of the other questions I've seen. I'm just trying to provide the password, but it keeps appearing like it is incorrect. It is not incorrect. I type this password hundreds of times per week, and if I delete the host info from the config file, it works fine. It is only when the host is in the config file that it repeatedly prompts for password.

I have tried rebuilding the id_rsa.pub file with command:

ssh-keygen -y -f id_rsa > id_rsa.pub

I have tried adding this to the config file

Host *
UseKeychain yes

Here's the only thing that is in the config file

Host my.hostname.com
  HostName my.hostname.com
  User myuser
  IdentityFile "~/.ssh/id_rsa.pub"

The user listed in config is not the same user as I am locally, if that makes any difference.

id_rsa & id_rsa.pub are both 600 permission

I'm not really sure where to turn on this. I've done a lot of searching and haven't found anything that seems to be similar. I'm on MacOS 10.12.6

  • To clarify, is it asking you for the user password for the remote machine, or is it asking for the local password for your RSA private key? – daviewales Feb 28 '18 at 21:50
  • @daviewales it is asking for the RSA key password. – mika Feb 28 '18 at 22:01

You must log in to answer this question.

Browse other questions tagged .