Something like ssh -o "PubkeyAuthentication=no" up ~/.ssh/config in your favorite text editor, create it first if you must, and enter the following: Host devserver2 When connecting to the secondary/key-less server, you can add -o "PubkeyAuthentication=no" when connecting. There are a small handful of ways to prevent this, the easiest two being to pass a flag on the command line, or add it as a permanent configuration item in your ~/.ssh/config file. The reason you are getting the key file passphrase dialog when connecting to the second (key-less) server is likely because the default configuration of SSH servers is to use public key authentication first, and 'keyboard interactive' authentication second.īecause you have a public key with a standard name/location ( ~/.ssh/id_rsa), your OpenSSH client helpfully submits the private key in order to allow the server to match it against an allowed authorized_keys file. If the file is located anywhere else you should specify that path after the -K in the command above. Note: Running ssh-add -K will only work if you have your private key file in one of the common locations, those locations being limited to: ~/.ssh/id_rsa, ~/.ssh/id_dsa, ~/.ssh/identity. Most resources seem to suggest that simply issuing ssh-add -K will let you store your passphrase, and will automatically configure OS X to launch ssh-agent automatically and load your stored passphrase. There is a lot of conflicting information I've read whenever I look up information on using ssh-agent (passphrase saving/reusing process) under Mac OS X. I find the password dialog extremely annoying and I am sure there must be some way to avoid having to dismiss this dialog SSH needs to access the id_rsa file. It is recommended that your private key files are NOT accessible by others.īad permissions: ignore key: /Users/myusername/.ssh/id_rsa When I relax these permissions to, say, 0640, I no longer see a dialog asking me for my password but ssh aborts with the following error: WARNING: UNPROTECTED PRIVATE KEY FILE! 0640 for '/Users/myusername/.ssh/id_rsa' are too open. It appears two more times if the OK button is clicked regardless of what is entered in the password field. Update: I see this dialog every time I connect regardless of whether I check "Remember password in my keychain". I see the same dialog when I connect to an FTP server with the Interarchy GUI client. When I connect to an SSH server which uses my private key in Terminal.app via ssh, a dialog pops up and asks me to enter my password to access the id_rsa file: I installed my SSH private key in ~/.ssh/id_rsa and set its permissions to 0600.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |