LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-16-2004, 01:23 AM   #1
aniketh
LQ Newbie
 
Registered: Apr 2004
Distribution: slackware 9.1
Posts: 2

Rep: Reputation: 0
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.
 
Old 06-16-2004, 01:32 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
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.
 
Old 06-16-2004, 01:38 AM   #3
aniketh
LQ Newbie
 
Registered: Apr 2004
Distribution: slackware 9.1
Posts: 2

Original Poster
Rep: Reputation: 0
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.
 
Old 06-16-2004, 02:04 AM   #4
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
http://tille.soti.org/training/sshkeys.php

might give you some pointers...
 
Old 06-16-2004, 02:31 AM   #5
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

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

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SCP: Copy file from remote linux server onto a windows machine? Tony Empire Linux - Newbie 21 09-22-2015 10:18 PM
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM
SCP Copy File SSH petenyce Linux - Wireless Networking 2 10-05-2005 03:11 PM
scp/ssh tail(multiple file) remote copy tpreitano Linux - General 1 08-22-2005 02:17 PM
copy files....using scp help me suguname Mandriva 5 01-25-2005 05:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration