LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   scp :copy file from one remote comp to another (https://www.linuxquestions.org/questions/linux-networking-3/scp-copy-file-from-one-remote-comp-to-another-194049/)

aniketh 06-16-2004 01:23 AM

scp :copy file from one remote comp to another
 
i'm using scp with ssh2, and using the the following syntax for scp
Code:

scp user1@host1:file1 user2@host2:file1
but it does not work.

note that when using relative paths in any one of the arguments, then it works perfectly, but then its just a remote comp to our comp,or the other way round.

please help.

ppuru 06-16-2004 01:32 AM

if you are copying from your system to a remote system

scp <path to local file> user@remotehost:<destination directory>

if you are copying from a remote system

scp user@remotehost:<path to source file> <destination directory>

remote system to another remotesystem e.g.

scp user1@remotehost1:<sourcefile> user2@remotehost2:<destination>

does not work with with password... not sure if it can work using keys.

aniketh 06-16-2004 01:38 AM

thanks for the quick reply. but could you please be more specific.

relative pathnames work, from remote host to current host, and vice versa.

we are using the third syntax, remote to remote, but it does not seem to be working.

we've tried a lot, but nothing seems to be working. as for password, we've tried using .shosts and such, but they don't offer any solution as well.

ppuru 06-16-2004 02:04 AM

http://tille.soti.org/training/sshkeys.php

might give you some pointers...

overlord73 06-16-2004 02:31 AM

local to remote:
scp file user@remotehost:/path/filename

remote to local:
scp user@remotehost:/path/filename /localpath


All times are GMT -5. The time now is 09:46 AM.