Re: first ssh, then start copying

From: Richard E. Silverman (res_at_qoxp.net)
Date: 02/14/04


Date: 13 Feb 2004 21:32:31 -0500


>>>>> "MW" == Mark Wirdnam <mark.wirdnam@stud.unibas.ch> writes:

    MW> Hello, I just can't find documentation on this: I often use ssh to
    MW> look at what files I have on a remote server, then exit,
    MW> remembering the location of the files I want to copy, and scp from
    MW> the local machine to get the files. This seems so inefficient, but
    MW> I never found the syntax to do something like "scp this_file
    MW> me@back_home:."during the ssh session, ...

Yes, this is a big lack in many current SSH implementations. A single SSH
connection can handle multiple "channels" which can be used for different
purposes simultaneously (terminal session, file transfer, port forwarding,
etc.). But the Unix style of doing things uses lots of different programs
(ssh, scp, sftp, etc.), and these programs do not cooperate to share
connections. So there's constant creation of new SSH connections, with
lots of unnecessary overhead and waiting for the user. Ideally, you would
only create a single SSH connection to each of the hosts you're working
with in a given session, and all your SSH needs to those hosts would use
those individual, long-lived connections.

The only Unix SSH software I know of that goes in the right direction with
this is LSH. It has a "connection server" which sits in the background
with an SSH connection open to a particular host, and a special client
command, "lshg", will connect using a channel obtained over the existing
connection via the connection server. Unfortunately, the last time I
looked at it, LSH was still very beta software and not up to daily use.

Note that the ssh.com GUI SSH client does this: opening multiple windows
to a host is very fast after the first one, since they all share the same
connection.

-- 
  Richard Silverman
  res@qoxp.net


Relevant Pages

  • Re: how to map drive via ssh?
    ... I'm assuming that both machines (client and server) are running ... be tunnelled over an SSH connection, ...
    (comp.security.ssh)
  • Re: Secure file sharing without OS X server?
    ... So I poked the GUI a bit - Finder, cmd-K, hit `Browse' in the `Connect ... to server' window, open the required server in the network browser, and ... them says `Allow secure connections using ssh'. ... `Can't make a secure connection to server ...
    (uk.comp.sys.mac)
  • RE: Re: Remote connections
    ... Compliments of Cygwin you can setup a SSH server on ... connection through the SSH connection. ... Aside from creating a VPN tunnel and then performing a Remote Desktop ... Server Terminal Services and XP and 2003 server Remote Desktop machines. ...
    (Focus-Microsoft)
  • Re: RWW basic question !!
    ... Go to www.internic.net and do a whois lookup of your domain name to see ... Advanced Windows Small Business Server 2003 Best Practices ... determine who hosts your DNS records. ... internet connection. ...
    (microsoft.public.windows.server.sbs)
  • Re: Exchange 2003 incoming SMTP network level problem
    ... > mail hosts when connected to an ADSL connection. ... > This same server same server receives the SMTP data from all mail ... > It works fine with the cable connection, ... > from ISPs because they tell me there is nothing wrong with my server.) ...
    (microsoft.public.exchange.connectivity)