Can I automatically login to ssh using passwords from OS X keychain?
- by Chaitanya Gupta
I need to login to an ssh server which doesn't support key based authentication. And I don't want to type the passwords every time.
I am using OS X Lion (10.7.2). I have added the passwords to the OS X keychain[1]. Now I can retrieve the password automatically from the keychain using /usr/bin/security, however I can't find a way to send this password to the ssh prompt.
I also tried sshpass. However when I try to run it ssh exits with the following error:
ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
Permission denied, please try again.
ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
Permission denied, please try again.
ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory
Permission denied (publickey,password).
Is there anyway I can login to this server without having to enter the password every time?
Notes
The scheme I use in keychain looks like this
Kind: Internet password
Account: username
Where: ssh://server-name