scp remote path specification

Markus Friedl Markus.Friedl at informatik.uni-erlangen.de
Tue Dec 19 20:51:03 EST 2000


On Mon, Dec 18, 2000 at 06:04:03PM -0600, Frank Tobin wrote:
> Markus Friedl, at 16:41 +0100 on Mon, 18 Dec 2000, wrote:
> 
>     you cannot assume that the path for the remote scp is the
>     same as for the local scp. it's better to add an option
>     to scp, e.g.:
>     	$ scp -X /remote/path/to/scp /etc/passwd otherhost:/etc
>     
> This is not a good solution if you ever expect there to be multiple remote
> hosts in scp's arguments (e.g., scp file at remote1 file2 at remote2).  You need
> to tie the path to each remote file-location specification.

more than 99% of the uses involve only a single remote host.

if you have more specific uses is much better to use ssh+tar
instead of scp.

many people have already problems with
	scp hosta:/file1 hostb:/file2
expanding to
	ssh hosta 'scp /file1 hostb:/file2'





More information about the openssh-unix-dev mailing list