Networking | Hardware | Software | Multimedia | System | Unix&Linux | MBA

Home>>Software>>SSH from Terminal drops connections

SSH from Terminal drops connections

plragde
04-18-2002, 09:32 PM
When using ssh to connect to a remote machine from my PB at home (through Airport and a cable modem), if I put the machine down for five minutes to do an errand and come back, the connection has frozen, and there is nothing to do but kill the window and start another one. Is there something that can be done to keep the connection alive? Many thanks. --PR

macubergeek
04-19-2002, 10:03 AM
try this:

add this line to your ~/.tcshrc file:
unset autologout

this should eliminate the console autologout in your shell

also doublecheck your dns.
If the dns server is really really slow ssh will crap out. SSh needs to reverse the ip you are coming from otherwise your connection won't happen at all or will crap out in mid stream.
Give me the ip address of the dns server your home machine is aimed at and I'll test it.
jim

plragde
04-19-2002, 10:11 AM
I have "unset autologout" in my .tcshrc on the remote side -- will check my .tcshrc at home later (I'm at work now). But if it's autologging out, shouldn't it say so, and not just freeze? My DNS is 24.153.22.66, and I'm sure it's slow, but that doesn't explain why the freezing only happens when I'm not using the Terminal window actively. --PR

macubergeek
04-19-2002, 10:21 AM
I tried resolving www.yahoo.com off your dns server and found it timed out
here try this:
open terminal and do:
nslookup www.yahoo.com and see how long it takes to come back


when I tested your dns I got:
Query Times for WWW.YAHOO.COM
----------------------------------
;; res_nsend to server 24.153.22.66: Operation timed out
1. Query Time (in msec):
;; res_nsend to server 24.153.22.66: Operation timed out
2. Query Time (in msec):
;; res_nsend to server 24.153.22.66: Operation timed out
3. Query Time (in msec):
;; res_nsend to server 24.153.22.66: Operation timed out
4. Query Time (in msec):

Now maybe your cable provider is limiting inquiries to those coming from your domain...I don't know...

plragde
04-19-2002, 11:23 AM
It won't respond for me from work, either, so I think you are right about it being domain-sensitive. But I still don't think this is the problem. I have an implementation of SSH on a Windows laptop that doesn't seem to have the same problem. Surely a Mac can do better!

macubergeek
04-19-2002, 03:10 PM
Check your windows machine and see if it's pointed at the same dns as your mac. I strongly suspect the crux of the problem is dns.

plragde
04-19-2002, 05:43 PM
At home now, and DNS is responding just fine. Both Windows laptop and Mac laptop are going through the Airport to the cable modem, and both have the same setup (DHCP from the cable router, Airport is bridge). I don't think it's the name server.

macubergeek
04-19-2002, 06:25 PM
Ok this is assuming you are using ssh v. 2 only now.
you can set two variables in your /etc/sshd_config file:
ClientAliveInterval
Sets a timeout interval in seconds after which if no data has
been received from the client, sshd will send a message through
the encrypted channel to request a response from the client.
and

ClientAliveCountMax
Sets the number of client alive messages (see above) which may be
sent without sshd receiving any messages back from the client. If
this threshold is reached while client alive messages are being
sent, sshd will disconnect the client, terminating the session.

So my suggestion to you would be to ssh to the machine that keeps cutting you off and check how these two variables are set in its sshd_config file.

Anybody else see if I'm off target here?

plragde
04-19-2002, 09:29 PM
Neither of these are mentioned in the sshd_config on the remote machine, so they take on the default values. But I think I got the Windows laptop to exhibit the same behaviour, meaning it may not be a Mac OS X problem. I'm still trying to confirm this. It's not that the remote machine kicks me off; the connection just freezes. After reading "man ssh", I tried getting it to freeze and then typing ~., which did log me off. --PR

macubergeek
04-20-2002, 08:25 AM
I read on the macsec mail list that macosx 10.1.3 and later default to ssh v. 2
I'm thinking that maybe there's a mismatch between the mac and the machine you are ssh'ing into...though a v.2 machine ought to step down to v. 1 if it encounters it.

joaquindromero
05-03-2004, 08:52 AM
macubergeek,

i think youre right about the DNS issue.

I have a 24.x.x.x DNS server through my cable service as well (Charter) and the SSH auth was S_L_O_W !!. I cleared out my default Charter DNS servers on my OSX Server and put in my DNS servers we use at work. Much, much faster!

I agree, DNS could be a culprit here...unless I'm too late...but it worked for me!

Thanks


 

TOP

Bodycote says profit i
Microsoft muses on fre

For more info

Bodycote says profit i
Microsoft muses on fre
after 10.1.3, MO remov
how to get a Voodoo 3/
Wacom USB Tablet Drive
HP 932C driver? 
Appletalk & Airpor
Olympus e100 won't "in
Lost printer in Classi
Hard Drive to Hard Dri

News Archive

Bodycote says profit i
Restructuring bites in
Office Open XML could 
Microsoft muses on fre
Connect to.... getting
sshd pb get_real_comma
Could be worse...... 
Cisco console port con
RDP Client 
scripting  internet co

Related stories:

RDP Client
scripting internet connection
FTP problem and network issue
iDisk Public Folder and non-iTools Members
Setting up a DNS server
Why is it so slooow...
home networking seems a mess
Internet Efficiency OS/X vs. OS/9.x

Copyright@2004-2005 www.zzcoke.com All Right Reserved

advanced web statistics