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

After adding a new user and his pub key to ~/.ssh/authorized_keys, I couldn't ssh to my slice (Permission denied (publickey)).

So I changed (in /etc/ssh/sshd_config) ChallengeResponseAuthentication from no to yes and added him to AllowUsers. Then, after trying to ssh: Connection closed by my.IP.here

So I changed ChallengeResponseAuthentication back to no,

`sudo kill `cat /var/run/sshd.pid` && /usr/sbin/sshd`

and since then I can't log in with my admin user (piotr): Connection closed by my.IP.here.

$ ssh -p my.port.here piotr@my.IP.here -vvv
OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to my.IP.here [my.IP.here] port my.port.here.
debug1: Connection established.
debug1: identity file /Users/piotr/.ssh/identity type -1
debug3: Not a RSA1 key file /Users/piotr/.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 /Users/piotr/.ssh/id_rsa type 1
debug1: identity file /Users/piotr/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debian-5ubuntu1
debug1: match: OpenSSH_5.1p1 Debian-5ubuntu1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
Connection closed by my.IP.here
share|improve this question

2 Answers 2

The answer is in that log:

unknown key type '-----BEGIN'

Seems like you somehow messed up your private key and ssh is no longer able to read it.

share|improve this answer
2  
Manni, thanks for your input. Log message is quite clear, although it wasn't a problem. Soft reboot helped, without any changes in configuration, frustrating... And now I can log in, even though 'unknown key type' remains. –  piobyz Aug 24 '09 at 13:58

unknown key type '-----BEGIN' appears even in normal connections. It's not something bad. I also get these: debug2: key_type_from_name: unknown key type '-----BEGIN' debug2: key_type_from_name: unknown key type 'Proc-Type:' debug2: key_type_from_name: unknown key type 'DEK-Info:' debug2: key_type_from_name: unknown key type '-----END'

in all of my connections (public key auth or not)

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.