Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Every thing was working fine till yesterday and now suddenly I am getting this error if I type

ssh -D 9999 vivek@172.16.30.30
ssh_exchange_identification: Connection closed by remote host

Here is the output:

OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 172.16.30.30 [172.16.30.30] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/adnan/.ssh/id_rsa" as a RSA1 public key
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug2: key_type_from_name: unknown key type 'Proc-Type:'
debug3: key_read: missing keytype
debug2: key_type_from_name: unknown key type 'DEK-Info:'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/adnan/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/adnan/.ssh/id_rsa-cert type -1
debug1: identity file /home/adnan/.ssh/id_dsa type -1
debug1: identity file /home/adnan/.ssh/id_dsa-cert type -1
debug1: identity file /home/adnan/.ssh/id_ecdsa type -1
debug1: identity file /home/adnan/.ssh/id_ecdsa-cert type -1
ssh_exchange_identification: Connection closed by remote host
share|improve this question
    
Can you run the command with -v so we can see more information? –  Samuel Apr 4 '12 at 21:23

2 Answers 2

Try changing the key type to 2 with the -2 option.

ssh -2 -D 9999 vivek@172.16.30.30

This error can occur when the command line options are incorrect.

share|improve this answer

The following lines can be very misleading:

debug3: Could not load "/home/adnan/.ssh/id_rsa" as a RSA1 public key
debug2: key_type_from_name: unknown key type '-----BEGIN'

From experience, I can say that this problem can be caused by server configuration even though the messages make it look like it is strictly a client key problem. Of course, you want to check your client configuration too. But if it was working and nothing on the client changed, be sure to look at the server config in spite of the misleading error message.

For example, I found that if your user is not allowed by ssh config on the server, the ssh client gives this exact same (misleading) error message.

sudo nano /etc/sshd_config
AllowUsers yourname@*
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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