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 have been working on a openSSL.cnf file that I intend to use to create my own PKI. I was not done working on that file yet, but I had to do something else. So I wrote it to disk unfinished, detached my screen session and logged out. Ever since, I cannot log back into the machine using SSH w/ a private key (which is the only way of getting to the machine).

If I run ssh -vvv example.com, I get the following

OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug2: ssh_connect: needpriv 0
debug1: Connecting to example.com [1.2.3.4] port 22.
debug1: Connection established.
debug1: identity file /c/Users/user/.ssh/identity type -1
debug3: Not a RSA1 key file /c/Users/user/.ssh/id_rsa.
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
  ^^^ this line 24 more times ^^^
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /c/Users/user/.ssh/id_rsa type -1
debug1: identity file /c/Users/user/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host

It looks like ssh is complaining about the formatting of my ~/.ssh/id_rsa. However, the same key still works for different servers. Anyway, here's what my identity file looks like:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,...

...
-----END RSA PRIVATE KEY-----

On the client, I am using the ssh implementation that ships with GitBash, since this gives me the most detailed output. (Putty is not so talkative in the debug department).

Did I mess up the sshd configuration on the server? Can I somehow still force my way in using ssh and the appropriate identity files? The server runs debian 6

share|improve this question
1  
Why are you using an ssh and ssl that's nearly six years old? –  Martin Schröder Jan 9 '13 at 22:34
    
You know how it goes: You inherit a server and don't have the time to polish all the bells and whistles. –  derabbink Jan 10 '13 at 7:55
    
Updating ssh 4.6 is not polishing. –  Martin Schröder Jan 12 '13 at 15:04
1  
Allright. I'll do that. In the mean time, I'd still like to know an answer to my question. –  derabbink Jan 12 '13 at 19:32

1 Answer 1

up vote 1 down vote accepted

I figured out the answer myself, once I gained access to the server again.

The answer is yes. Moving my incompletely edited /etc/ssl/openssl.conf to /root/messed-up.openssl.cnf fixed the problem for me.

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.