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.

I'm trying to SSH from a Windows/Cygwin to Ubuntu. I am not using PuTTY. Instead, I'm using Cygwin ssh, which should be OpenSSH. I used ssh-user-config on the Windows machine to generate my key pairs: RSA1, RSA2, and DSA. I'm not using any passphrases on the keys. When I run:

ssh -vvv zzzz@zzzz.zzz

I get:

OpenSSH_5.6p1, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /c/Documents and Settings/zzzz/.ssh/config
debug2: ssh_connect: needpriv 0
debug1: Executing proxy command: exec corkscrew corporate.proxy.zzz 8080 zzzz.zzz 22
debug1: permanently_drop_suid: 101684
debug3: Not a RSA1 key file /c/Documents and Settings/zzzz/.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 /c/Documents and Settings/zzzz/.ssh/id_rsa type 1
debug1: identity file /c/Documents and Settings/zzzz/.ssh/id_rsa-cert type -1
debug3: Not a RSA1 key file /c/Documents and Settings/zzzz/.ssh/id_dsa.
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
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /c/Documents and Settings/zzzz/.ssh/id_dsa type 2
debug1: identity file /c/Documents and Settings/zzzz/.ssh/id_dsa-cert type -1
ssh_exchange_identification: Connection closed by remote host

I'm using corkscrew on my Windows machine to get through the corporate firewall. I don't think that has anything to do with this issue.

If it matters, the target server is a Slicehost Ubuntu 10.04 (Lucid) LTS instance. I assume it's running OpenSSH as well, so shouldn't the Cygwin OpenSSH generated keys be compatible with Ubuntu???

The private key (~/.ssh/id_rsa) looks like:

-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA0tASFawZdtNVXYg7ms6z1R2YiPcuBUgMt0loZSbmCzovuHG6
2wrU5SIiaSpPlQbsVJXjOcCzNhn8wujXo0J/RiOge7MnSmCKAaWtRc7cidh9qO13
nh8IL9TC94Cj+bPBSC5fYewc+B92WBnG2YmKRD8OxEc7KaHtchqhfsz9IzHPHKl4
r6PhIuevAymYT3YMMWF+yjmECrwIS/7nw1mSn4qUDYMU+t6dbhO+Sw/hfYvvzCMI
ILZKF5WTN7zNO5Sl1VS1BHxB0mb2Yg+BpmjQ8iEPoUuqUA+LA3+A1jVFBjrtFCoZ
1ARKO6GwE1PfFIgepuzu4msdOu4NHH+HwsZj/wIDAQABAoIBAQDSbG4gw9AHE5s5
6SnVtE08hHYlANUm4GwQ520UymcE/ed0K9FfosgujovafSlCj86F/7b3hqlbb0Ul
KFVV2KJB2H3v+ztUulgGnOD/tSPdVALaA25Knp8FX1HcysLiE9LxwZfjnlKsOHtg
JRqfOPKSfH643IDpZYAlTP+2GdbysI016ZxBajRJfl6vkd8LVqnX682LFNlQv7aQ
L/hnPZYWmwDtlFZE6ZWqex/kYQksDsqthYOf4chY8kvpLqIkquCniq7nLC3hDHSl
6peUtuoq0eoNO3G3PHbvkoMz02V15PdADZeA9yr33T+hDP2aRgFqMfBthA3lFphX
+XV8I2BBAoGBAO0IP5TocnMpyVERRBNlobBSxk66XeMCWvZPfKapeHTLZjSaIgh5
1R9WSD2jmtRTpDONSwigbniwB4Yb+nELsITI7i3jp3s/MQMQgaqXJgMwEyCYChji
Va2P1kP/ijKHsoDc0Il6KWgDkyqw2l2KU0w46esCEl6izM+I7O6PAw2lAoGBAOOu
s2QQTT1Om8iN7hpSp8nLjJvDdWy6Q2zHKrd6KEHY1Xrvrgy/5xtldx66DNbDT647
9nShyh5A2UOBx6NV8PG7zWjoz28E8O1EWGiEIxgDIFrMn6aU9hOA9gYOprcqbpL0
fWGVYBy8dF2hinLUC9OGUw7F/+mLHqbuY12aOoHTAoGAUixJ3pW3F7Wk1TXnI9JX
+4i2txRk+A4Y+ssTq7OUzui0xgepRMb326VN5hCR3IoioryZBqSXp79e3F9Ws1oa
F+6Qo9gId/GwTB+s1DcSNoi0GNicp4PPsBvtbCVrA5mHiKUEpqRzNlwG6QXmrgcG
WaZhcdeGBsjpuAkAGrP5mwECgYBmsAZsnQWZHvkX7Rt0d88BLnLOVcuCLEf4qaNU
eR3rBNbTyYHgcjTToGGnVBYyToiDdrvjQo0cM/dJgSD/Q+WVwTQVmtrjoYDgIjEV
gnMpg092ZE+lHA4YIdPUS4tZlSOl1+sstehRTZXWHOOKgqSK1Exln1uag4phk6bx
MnwszQKBgQDVvg8QbHOVL82ZpqfoTmBY3+ZNrOHMlo8hH4X40veAhjKaSyAZw1qx
BEJVNgHT/UZkM10kAYtRNsmp0CFPyAY9rTy9ekEKfht6HSO10j8Nzv3v+zI0DEx9
/2+0vcPQZyKVHz//VJPQ5g084l22qMdLCDqVWkZbfgVJkjH45LIY5w==
-----END RSA PRIVATE KEY-----

Update:

So I got home and looked at /var/log/auth.log (thanks Rob!). When connecting I only get:

sshd[2421]: Did not receive identification string from 999.999.999.999

When I ran sshd in debug mode, all I get is:

sshd[2423]: debug1: sshd version OpenSSH_5.3p1 Debian-3ubuntu4                       
sshd[2423]: debug1: read PEM private key done: type RSA                              
sshd[2423]: debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048        
sshd[2423]: debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048              
sshd[2423]: debug1: private host key: #0 type 1 RSA                                  
sshd[2423]: debug1: read PEM private key done: type DSA                              
sshd[2423]: debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024        
sshd[2423]: debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024              
sshd[2423]: debug1: private host key: #1 type 2 DSA                                  

The blacklist files mentioned do not exist.

share|improve this question

1 Answer 1

The id_rsa key file must contain a header block identifying the type. It seems that that is corrupted. You should probably try recreating the key using the keygen command.

The header for my cygwin generated key file is like:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,48818Cxxxxxxxxxxxxxxxxxxxxxxxxxx
share|improve this answer
    
I tried using ssh-keygen on the Windows/Cygwin machine to generate an RSA2 key pair again, but it still has no header block. Is this an issue with Cygwin's OpenSSH? –  alyssackwan Sep 30 '10 at 17:27
    
what is the exact command you ran? Are you using Cygwin 1.7? –  Rob Sep 30 '10 at 17:42
    
My Cygwin setup is 2.721. I'm using the mirror.cs.vt.edu mirror. Cygwin itself is 1.7.7-1. And openssh is 5.6p1-2. My command was "ssh-keygen -t rsa". –  alyssackwan Sep 30 '10 at 17:53
    
Seems that your home folder (/c/Documents and Settings/zzzz/) has spaces in it. The Cygwin FAQ suggests that (in addition to spaces in the user name) spaces in the home folder pat can cause problems. cygwin.com/faq/faq-nochunks.html#faq.setup.name-with-space –  Rob Sep 30 '10 at 18:24
1  
You posted your whole private key, so you should be sure to generate a new one. You should also check the remote server's auth.log file for errors as you attempt to login using the key. –  Rob Sep 30 '10 at 19:03

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.