1

I am having a hard time understanding the output from the command below. I am trying to connect to a godaddy server and have been unsuccessful. I enabled SSH access on godaddy's cpanel, created a public/private key, downloaded the private key, moved it into ~/.ssh and added the key to the keychain using ssh-add -K ~/.ssh/mykey. I am unable to connect. I know there is another question on this site but I am providing actual output and want to know the reason it's failing.

I am not sure why it's not looking for SSH key called key4govi (that's what my private key is called. It seems to be looking at they key id_rsa(assuming from the output).

Here are my folder contents for the .ssh folder on my local machine:

github_rsa              
github_rsa.pub      
id_rsa
id_rsa.pub
key4govi
key4govi.pub
known_hosts

Here's my command: ~ => ssh callydai@callydai.com -vv

Here's the output:

OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: /etc/ssh/ssh_config line 53: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to callydai.com [107.180.55.15] port 22.
debug1: Connection established.
debug1: identity file /Users/raigovind93/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raigovind93/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raigovind93/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raigovind93/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raigovind93/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raigovind93/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raigovind93/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/raigovind93/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
ssh_exchange_identification: read: Connection reset by peer
1
  • 1
    we are not blind, please don't use this kind of big bold text – LinuxSecurityFreak Feb 5 '17 at 4:36
0
ssh_exchange_identification: read: Connection reset by peer

points out to different error. It means that you were able to connect to ssh server but the connection was closed immediately without getting correct "hello" message. Is the server running there? Isn't there some kind of policy where from you can connect? Do you have correct reverse DNS record?

Your key is correctly in keychain and once you would be able to connect to the correct key will be offered. The other keys touched are default paths and ssh will try to open them always.

3
  • I see. the server is running because callydai.com defintiely works, the reverse DNS record is correct as well. Could you elaborate what you mean by policy? It honestly seems ssh connections are being blocked.. – Govind Rai Feb 5 '17 at 8:15
  • I am not talking about godady server, but ssh server. The policy in your provider can somehow block the connection, both the policy on their side. You would have to talk to godady about that. Or have a look into the server log if you have access to something like that. – Jakuje Feb 5 '17 at 8:16
  • Ah of course. my bad. I have no way of accessing the mainframe so I can't actually type any commands. The only thing I can rely on is the cpanel gui where I click SSH and hit enable SSH and I have clicked it just now again, but still getting the same error. The godaddy filesystem doesn't have sshd or ssh error logs... I will have to contact them – Govind Rai Feb 5 '17 at 8:18
-1

You need to add your client's public key in the server's authorized keys. So you append the contents of client:~/.ssh/id_rsa.pub into server:~/.ssh/authorized_keys.

3
  • Hi Julie, I have done that but I am still getting the same error. – Govind Rai Feb 5 '17 at 6:21
  • From server, ls -l ~/.ssh/authorized_keys? – Julie Pelletier Feb 5 '17 at 6:56
  • unfortunately I don't have access to the the mainframe from the godaddy website, but I do have access to the cpanel interface. The authorized_keys file is definitely there in the .ssh folder. it has a permission of 644. and like instructed, I copied the id_rsa.pub from my computer to the authorized_keys file on the server. – Govind Rai Feb 5 '17 at 7:13
-1

Maybe you can try this command

ssh-copy-id -i identity-file(ex.id_rsa.pub) user@server

You will be asked to enter the password for the account, that means, PasswordAuthentication yes must be set.

The command creates the needed entry in .ssh/authorized_keys. So after that you should be able to connect to the server via ssh -i identity-file user@server

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.