login
Header Space

 
 

Re: scp batch mode?

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: James Hartley <jjhartley@...>
Cc: OpenBSD Misc <misc@...>
Date: Thursday, August 16, 2007 - 4:53 am

Another way:

# Open a connection to the remote host and
# create a control socket at /tmp/ssh_socket
ssh -S /tmp/ssh_socket -M -N -f host.example.com

# Use the control socket to transfer files.
scp -o ControlPath=/tmp/ssh_socket file1 dummy:remote_file1
scp -o ControlPath=/tmp/ssh_socket file2 dummy:remote_file2
# etc.

# or with rsync...
rsync --rsh="ssh -S /tmp/ssh_socket" -av /local/dir/ dummy:/remote/dir/

# Bring the connection down.
ssh -S /tmp/ssh_socket -O exit dummy


The "dummy" host above can be anything, it doesn't matter since you
have already specified the socket to send things through.


Cheers,
Andreas

On 15/08/07, James Hartley <jjhartley@gmail.com> wrote:


-- 
Andreas Kahari
Somewhere in the general Cambridge area, UK
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
scp batch mode?, James Hartley, (Wed Aug 15, 2:50 pm)
Re: scp batch mode?, Andreas Kahari, (Thu Aug 16, 4:53 am)
Re: scp batch mode?, Daniel A. Ramaley, (Wed Aug 15, 3:20 pm)
Re: scp batch mode?, Jeremy C. Reed, (Wed Aug 15, 3:16 pm)
Re: scp batch mode?, Dag Richards, (Wed Aug 15, 3:06 pm)
speck-geostationary