[nflug] ssh file transfer

Sam Stern samstern at samstern.net
Wed Sep 27 11:01:49 EDT 2006


 

> -----Original Message-----
> From: nflug-bounces at nflug.org 
> [mailto:nflug-bounces at nflug.org] On Behalf Of eric
> Sent: Wednesday, September 27, 2006 10:29 AM
> To: nflug at nflug.org
> Subject: [nflug] ssh file transfer
> 
> Hi, I was wondering if you can upload a file from your local 
> computer to
> a remote computer whilst still logged into ssh.  I have been 
> using scp,
> but I suppose I could just use scp while I am in the ssh, just seems
> kind of redundent.
> thanks,
> eric


Hi Eric,

This is possible in theory, using the right terminal emulator and a transfer
program like Kermit, x|y|zmodem but clunky and pretty much no longer
supported. Now I should note that issuing an scp in the ssh session will NOT
double encrypt the data you are sending; if you issue scp (or sftp or ftp or
rsync or whatever) to transfer files in a ssh session the file transfer
program you select will open a new session to the "remote" host - completely
independent of your current ssh session (unless you had the foresight to use
an ssh tunnel).


I suspect the core problem here is how you are working:

At the local system issue a "man screen". Learn screen. Screen is your
friend. Screen is good food. Learn to cut and paste in screen. This is a
good thing (tm)

Now here is an example of how one would use screen to avoid the situation
you are finding yourself in:

On your local system issue a "screen"
Now "ctl-a ctl-c" this makes a second "window"
You are at window 1
Ctl-a 0 switches to the first window
Ctl-a 1 switches to the second window
Et viola! Ssh to the remote host in one of the windows and copy the files
with scp in the second!
Easy one you get the hang of it.
NB: screen remaps ctl-a which bash uses to go to the begging of the line. So
in bash, after issuing a screen, ctl-a a sends bash a ctl-a ;>

HTH,

Sam S.




_______________________________________________
nflug mailing list
nflug at nflug.org
http://www.nflug.org/mailman/listinfo/nflug



More information about the nflug mailing list