3

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

ssh -D 9999 [email protected]
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
1
  • Can you run the command with -v so we can see more information?
    – Samuel
    Commented Apr 4, 2012 at 21:23

2 Answers 2

1

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@*
0

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

ssh -2 -D 9999 [email protected]

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .