sshd falls asleep?

hazmat

Rusher of Din
Sometimes I will ssh to my OS X machine at home from work, and the remote machine will tell me that the secure connection was refused. It will do it as many times as I try. The only way I see to wake up sshd is to telnet to it (port 22) and then it will accept connections. Anyone know why this is?

Thanks.
 
So when you do ssh homemachine, every time it will say ssh: connect to address home_ip port 22: Connection refused? Once you do telnet homemachine 22, it doesn't give a refusal, and then the above ssh command works fine? If the telnet does connect, does it say
Code:
Trying home_ip...
Connected to homemachine.
Escape character is '^]'.
SSH-1.99-OpenSSH_2.9p2

If this is exactly the case, then that's outrageously odd, as ssh machine and telnet machine 22 do the same network-level tasks. If not, then definitely post what's different. I just want to make sure the commands and results are explicit.
 
That's exactly what I'm saying. Isn't it odd? Onloy difference, which I suppose is trivial, is that the refusal message is:

Secure connection to <hostname> refused.
 
That's:

Secure connection to homemachine refused.


I had put that in angled brackets. Damn html. :)
 
Next time ssh gives you that error, rerun it with verbose mode, ssh -v -v &lt;homemachine&gt; and we'll see if there's anything interesting there.
 
Have you tried using ssh -vv username@hostname ?? ssh -v -v and ssh -vv are the same thing, the latter one just takes up less space and i think it looks prettier, but anyways you could also just try to download and install the most reacent version of SSH?

Justin
 
Okay, here's something really odd. It seems that the issue may not be the remote OS X sshd, it may be the local OS X's ssh CLIENT. Is there anything odd about the default OpenSSH install on OS X? When it happened again, I tried connecting from a Sun Ultra 5, also with OpenSSH installed, and it connected fine. After it did, I went back to the Mac, and it also connected fine, just like when I telnetted to port 22 from it and then tried sshing again.

Does make any more sense? Still seeming really odd to me.

Thanks.
 
Well, as we found a couple months ago the ssh on OS X does act a little strange with certain hostname resolution setups.

Other than that, I use the OS X client to connect to a couple of Suns and an OpenBSD box, and haven't had this kind of problem (but not to another OS X machine).

It makes me wonder, though, why Apple is kinda slow with updating the OpenSSH install, as 3.0.2 has been out for a month now, and several versions between that and the default with the OS (2.9)
 
Back
Top