Re: ssh exec overhead

From: Darren Tucker (dtucker_at_dodgy.net.au)
Date: 07/30/04


Date: Fri, 30 Jul 2004 08:32:24 +0000 (UTC)

In article <Pine.LNX.4.60.0407291309370.27587@unhtugznvy.pbz>,
Linux Doctor <NOSPAMusenet@haughtmail.com> wrote:
>I'm using ssh to invoke a command on a remote machine. The "remote"
>machine is actually on the same desk as the local, and is connected via
>gigabit ethernet. I've noticed that there's some overhead attached to the
>remote execution via ssh... presumably from authentication (which is
>automatic via .shosts, or no-passphrase-required RSA). The overhead is
>significant, in my opinion, at about .3 seconds. That is:

That seems roughly right for OpenSSH on PC-class hardware. See:
http://www.openssh.com/faq.html#3.3

>Is this delay typical via ssh? Is there a way to avoid it and still
>use ssh? Thanks. Neall

You can use one connection and invoke multiple sessions over it.
OpenSSH's server has had this capability for a while but support for
it was only recently added to the development version. Other SSH
software may or may not have equivalent capability (but it's certainly
in the spec).

Discussion about this:
http://undeadly.org/cgi?action=article&sid=20040719232710

$ time ssh localhost sleep 4
real 0m4.469s
user 0m0.070s
sys 0m0.000s

$ time ssh -S ~/.ssh/sock localhost sleep 4
real 0m4.203s
user 0m0.010s
sys 0m0.020s

-- 
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 hanging
    ... > I'm facing a new kind of problem with SSH ... > connection from other ips. ... Good judgement comes with experience. ...
    (SSH)
  • Re: Binding ssh to a loopback address
    ... but what you're describing is a remote forward. ... that command will try to bind the client's end of the SSH ... connection from 127.0.0.2 to your remotehost. ... Good judgement comes with experience. ...
    (SSH)
  • Re: What is The SSH?
    ... Building and Using SSH Tunnels ... What is an SSH tunnel? ... how to use it to make a connection to a server. ... You will need a working SSH client and server installation to build and test ...
    (microsoft.public.windows.server.networking)
  • Re: Max wins
    ... That was their connection - his only connection was with them. ... with his parent's politics, I'd totally agree. ... explicit evidence is not currently in the public domain. ... My beef with Max, though, is his judgement. ...
    (rec.autos.sport.f1)
  • Re: Problem connecting to SSH, OpenVMS7.3-2, HP TCP/IP v5.4 patched
    ... warning: Authentication failed. ... connection lost (Connection closed by remote host.). ... So, as you can see, I am trying to make an ssh connection with the ...
    (comp.os.vms)