Solution to "Cannot connect via SSH, but I can do so with Sequel Pro"

I experienced the issue described here, and wanted to share my solution, but the issue is closed for comments (although the youtrack there refers to a different issue).

I was getting "USERAUTH FAIL" (and not "Algorithm negotiation fail" that is addressed in the youtrack).

The problem appears to be in the ssh key I had used. While it didn't have a passphrase, it seems that it was encrypted. Apparently OpenSSH doesn't like that.

I could tell that it's encrypted by the header:

Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,EA1344F7CC19CBE4F08E86D080D9A5F6

I replaced the key with an unencrypted one, and now everything works.

Comment actions Permalink

I've been running into the same issue for a while and this seems to have fixed it.

Strangely though, it was possible for two projects to share the same details and one would succeed and the other would fail..

Comment actions Permalink

I encountered a smiliar problem when trying to use DataGrip to connect to a MySQL database. In my case the id_rsa file was encrypted with a passphrase when it was created. I no longer recalled what the passphrase was but managed to recover it following the steps outlined in Once I obtained the passphrase for the id_rsa file using Keychain Access I was able to enter it into DataGrip in order to authenticate myself to the MySQL database. I hope this information may help others resolving this issue.


Please sign in to leave a comment.