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 a peculiar situation where i can ssh into server1 from server2 but cannot ssh into server2 from server1. /etc/hosts is fine as it has all the correct IP's but ssh with the ip-s also hangs.

here is a sample of the logs
root@server1 ~]# ssh -v -v -v server2
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for * debug2: ssh_connect: needpriv 0
debug1: Connecting to server2 [192.168.0.2] port 22.
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
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

I get stuck there eternally.

Thanks for your help

share|improve this question
add comment

migrated from stackoverflow.com Apr 7 '11 at 15:28

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

2 Answers

up vote 0 down vote accepted

SSH is not symmetric in terms of the encryption process, so it working one direction does not guarantee that it'll work the other direction. From the given dump file, it looks like a malformed keyfile on the target is preventing SSH from completing authentication.

share|improve this answer
    
Yes this was th problem –  artfullyContrived May 2 '11 at 19:56
add comment

Look at the output from

strace -f -o /tmp/mydebug ssh -v -v -v server2

The output will appear in /tmp/mydebug CTR-C the application when it seems to be hung and take a look in the file /tmp/mydebug This may help you track down the problem, ie. file permissions, trying to access a directory that is missing, system calls blocked waiting on IO.

Good luck.

share|improve this answer
add comment

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.