Rails Capistrano deployment: SSH, Error reading response length from authentication socket
If you’re running a rails application with capistrano and you run into the following error:
Error reading response length from authentication socket
When you attempt to connect via cap, for instance
> cap staging deploy
Then make sure you can answer the following questions with a ‘yes’ before continuing.
1) Is my private key properly created and available on my local system. Simple configurations will generally maintain the key at:
2) Is my public key available on the remote server. If not, you will need to add it to the authorized_keys file on the remote server:
Your public key can be found in the following location (on your local machine):
~/.ssh/id_rsa.pub (or whatever your public key pairing is for your situation)
and paste it as a newline in the above file on the remote server (authorized_keys).
If you are still experiencing the authentication socket error, do the following at your local command prompt:
> eval $(ssh-agent)
This is particularly important if you are using a private:public key pairing and expecting capistrano to allow agent forwarding.