Re: 2 SSH questions: why does it pause so much, and, can I keep connection alive?

From: Darren Tucker (dtucker_at_dodgy.net.au)
Date: 03/31/04


Date: Wed, 31 Mar 2004 02:18:18 +0000 (UTC)

In article <BC8F81AF.1336E%mlevin77@comcast.net>,
Michael Levin <mlevin77@comcast.net> wrote:
>I'm running SSH clients on a Mac OSX to connect to a Unix box. Does anyone
>have any thoughts on the following:
>
>1) it works ok to connect, but every 30 seconds or so, everything freezes,
>and I have to wait a while (another 30 seconds). In the meantime, my
>keystrokes get saved, but it's a pain in the ass when doing real-time word
>processing (in Emacs) for example. What's going on? Why is it jumpy like
>that? The host machine is not busy, and I'm on a T1 line at work, so I can't
>believe it's network throughput or CPU time issues. Maybe I have some sort
>of parameter set wrong? Has anyone else observed this sort of intermittent
>pausing?

Do you have a firewall between client and server? It sounds like you do,
and that is has a state-table timeout of about 30s.

>2) If I open a connection, and don't touch it for some minutes, the host
>disconnects, leaving me with an unresponsive window - have to close it and
>re-connect. Is there any tweak that I can use to keep the connection alive?
>I don't own the host machine, so I wouldn't be able to muck with the ssh
>server on that side, but maybe there's some trick for making it stay
>connected?

Put ServerAliveInterval into ssh_config on the client (OpenSSH 3.8 and
up) or ClientAliveInterval into sshd_config on the server (OpenSSH 2.9
and up). I suggest 20 seconds.

Also, run "ssh -vvv" and see if there are any messages corresponding with
your freezes.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


Relevant Pages

  • Re: ssh security question
    ... In my case - the client is a windows client and the ssh is embedded into the windows nx client. ... Is there any reason I can't run ssh-keygen on the server and copy the private key to the client - and the public key to the "authorised" directory? ... sniffer can catch your passwords, and it would make it trivial to log in ...
    (SSH)
  • Re: Trouble with X11 over SSH on Mandriva 2010.0
    ... If next clean install/update causes ssh to break, ... installed the sshd daemon/service package (OpenSSH Server) on the server. ... correct values for client and server. ...
    (comp.os.linux.networking)
  • Re: Publishing a SSH Server
    ... Your unix box cannot reply to SSH request, ... Create a client address set for your unix box (ip address from to are the ... Jim Harrison [ISA SE] ... In that case the server is a SecureNET client but still it doesn't work.... ...
    (microsoft.public.isa.publishing)
  • Re: FC6 VPN
    ... Then you can run any application you would like off the server by simply running it, or if you want to run a whole session, use gnomesession. ... ssh client that supports X forwarding, which is want you want to be looking at. ... SSH allows you to forward any local port to any remote port. ... If you need to connect to, say a windows share, you would forward your local port to the linux server through the ssh tunnel. ...
    (Fedora)
  • Multiple issues with Mac OS X AFP client
    ... Multiple issues with Mac OS X AFP client ... connections to an Apple file server over SSH - a commendable effort to ... .GlobalPreferences.plist (the AFP client does not follow Apple's ...
    (Bugtraq)