need some help with networking on a friends

Tim Wunder tim
Mon May 17 11:37:12 PDT 2004


On 9/4/2002 1:55 AM, someone claiming to be Keith Antoine wrote:
> On Wed, 4 Sep 2002 14:26, Kevin O'Gorman wrote:
> r> I use scp all the time.  It just seemed to work naturally once ssh was
> 
>>itself working -- scp depends on ssh.
>>
>>The syntax is basically like 'cp' itself, except when you refer
>>to a remote location.  For one thing, you have to name the remote
>>host, so a command like
>>   scp myfile.txt user at host:
>>will copy the myfile.txt to user's home directory on host, and
>>   scp myfile.txt user at host:subdir
>>will copy it into a subdirectory of user's home directory.
>>
>>You can omit 'user@', and scp will use the same username you're using
>>on the local host.  You must have the host and the colon (":") for
>>scp to know it's to copy to the remote host.
>>
>>You can copy the other way too:
>>   scp user at host:hisfile.txt .
>>
>>I have not had much luck using wildcards in the remote filespec.
>>
>>++ kevin
> 
> 
> I have to "SEE" things nowadays, so do me a favour:
> If your had ssh access to my machine which is on bigpond.net.au
> and user kantoine, what command would you type in, please.
> 

Your at a location other than bigpond.net.au and you want to copy a file called filename.sxc that's in /home/kantoine/docs on bigpond.net.au to /home/remotefiles at your current location:
scp kantoine at bigpond.net.au:./docs/filename.sxc /home/remotefiles 

To go the other way:
scp /home/remotefiles/filename.sxc kantoine at bigpond.net.au:./docs/

In either method, you'll get prompted for kantoine's password and the file will get copied, securely.

It's just like the syntax for cp, except that you need to specify the user/hostname of the remote location you're copying to/from as "<user>@<hostname>:", in addition to the directory/filename.

HTH, 
Tim

.
-- 







More information about the Linux-users mailing list