Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to SSH into a remote VM, and the command hangs forever.

Before, when I was trying to get some stuff set up on it, I edited /etc/hosts and /etc/init.d, and I'm worried I might have messed something up. If it isn't obvious, I'm a bit new to networking/server admin stuff.

Running with -v gives me this:

ssh USERNAME@IP -vvv
OpenSSH_5.9p1, OpenSSL 0.9.8x 10 May 2012
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.150.42.39 [10.150.42.39] port 22.
debug1: Connection established.
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_rsa type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_rsa-cert type -1
debug3: Incorrect RSA1 identifier
debug3: Could not load "/Users/LOCALUSERNAME/.ssh/id_dsa" as a RSA1 public key
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_dsa type 2
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_dsa-cert type -1

EDIT: I tried moving the id_dsa and id_dsa.pub files away and got these messages instead:

ssh USERNAME@IP -vvv
OpenSSH_5.9p1, OpenSSL 0.9.8x 10 May 2012
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.150.42.39 [10.150.42.39] port 22.
debug1: Connection established.
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_rsa type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_rsa-cert type -1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_dsa type 1
debug1: identity file /Users/LOCALUSERNAME/.ssh/id_dsa-cert type -1

EDIT2: If anyone else runs into this problem: Apparently my VM ran out of memory and hung. My sysadmin restarted it and that fixed it.

share|improve this question

migrated from serverfault.com Jul 23 '13 at 15:45

This question came from our site for professional system and network administrators.

    
Are you sure it hangs forever? I hear this a lot from people whose definition of "forever" is "longer than 10 seconds, but less than 30". It is common to have to wait ~60 seconds if you've messed up /etc/hosts or DNS configuration, depending on your settings in the sshd configuration. I strongly recommend you set a timer and wait 120 seconds, then report back here. –  Jed Daniels Jul 22 '13 at 16:09
    
It's been going for about 10 minutes now. –  sfendell Jul 22 '13 at 16:10
1  
Ah. Well then. Do you have access to the system via another mechanism so you can see what is going on in the sshd logs? You could also try pasting the output of more 'v's on the client side (e.g. -vvv), but I'm guessing you won't be able to figure it out without access to the server side. –  Jed Daniels Jul 22 '13 at 16:13
    
Unfortunately this is the only access I have. I tried -vvv and got some additional messages which I've added to the OP. –  sfendell Jul 22 '13 at 16:18
    
What happens if you move the keys it's looking at someplace else? –  Nathan C Jul 22 '13 at 16:20

1 Answer 1

up vote 0 down vote accepted

Turns out the machine was constantly running out of memory due to unrelated (and still slightly mysterious) reasons. Restarting it fixed it temporarily but it would soon run out again. I ended up trashing the VM and getting a new one.

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.