Re: ssh


Subject: Re: ssh
From: Mike Tibor (tibor@lib.uaa.alaska.edu)
Date: Thu Feb 21 2002 - 10:23:01 AKST


On 20 Feb 2002, Adam Elkins wrote:

> Once I log into the host, how do I copy files from the host to the
> client? And vis-versa.

I tend to use scp more than sftp, but in case some examples would help:

scp file.tar.gz host2:
(puts file.tar.gz into your homedir on host2)

scp -r somedirectory host2:
(copies somedirectory and its contents to your homedir on host2)

scp host2:file.tar.gz ./
(copies file.tar.gz from your homedir on host2 to the current directory)

cat file2.tar.gz | ssh host2 "cat > file2.tar.gz"
(another way of copying a file to your homedir on host2)

ssh host2 "tar cf - somedirectory" | tar xf -
(anotherway of copying a directory from host2 to the workstation)

I always like examples when I'm dealing with something new. :-)
Mike

-- 
Mike Tibor         Univ. of Alaska Anchorage    (907) 786-1001 voice
Network Technician     Consortium Library         (907) 786-6050 fax
tibor@lib.uaa.alaska.edu       http://www.lib.uaa.alaska.edu/~tibor/
http://www.lib.uaa.alaska.edu/~tibor/pgpkey  for PGP public key



This archive was generated by hypermail 2a23 : Thu Feb 21 2002 - 10:23:03 AKST