Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am getting the following error while running ssh in linux

 ssh root@localhost -p 4440 -vvv
 OpenSSH_5.0p1, OpenSSL 0.9.8g 19 Oct 2007
 debug1: Reading configuration data /etc/ssh/ssh_config
 debug1: Applying options for *
 debug3: cipher ok: aes128-ctr [aes128-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc]
 debug3: cipher ok: aes256-ctr [aes128-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc]
 debug3: cipher ok: arcfour256 [aes128-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc]
 debug3: cipher ok: arcfour128 [aes128-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc]
 debug3: cipher ok: aes128-cbc [aes128-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc]
 debug3: cipher ok: 3des-cbc [aes128-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc]
 debug3: ciphers ok: [aes128-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc]
 debug2: mac_setup: found hmac-sha1
 debug3: mac ok: hmac-sha1 [hmac-sha1,hmac-ripemd160]
 debug2: mac_setup: found hmac-ripemd160
 debug3: mac ok: hmac-ripemd160 [hmac-sha1,hmac-ripemd160]
 debug3: macs ok: [hmac-sha1,hmac-ripemd160]
 debug2: ssh_connect: needpriv 0
 debug1: Connecting to localhost [127.0.0.1] port 4440.
 debug1: Connection established. 
 debug1: permanently_set_uid: 0/0
 debug1: identity file /root/.ssh/identity type -1 
 debug3: Not a RSA1 key file /root/.ssh/id_rsa.
 debug2: key_type_from_name: unknown key type '-----BEGIN'
 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 /root/.ssh/id_rsa type 1
  debug1: identity file /root/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host

Can any tell me why this problem occurs and how can i solve this ?

share|improve this question

migrated from stackoverflow.com Jul 28 '12 at 20:59

This question came from our site for professional and enthusiast programmers.

1 Answer 1

Looks like a bad, perhaps outdated, format for root's id_rsa key. Try making a new one with ssh-keygen. Also check/update your identity file, remove it if you don't need it.

share|improve this answer

Your Answer

 
discard

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