Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Mar 1998 05:34:16 +0000
From:      "Aaron D. Gifford" <agifford@infowest.com>
To:        questions@FreeBSD.ORG, eddie@wicked.eaznet.com, sue@welearn.com.au
Subject:   Re: ssh
Message-ID:  <3508C558.1174639A@infowest.com>
References:  <19980312163828.28109@wicked.eaznet.com.> <3508A6F4.24D119F9@dal.net> <19980313145930.62669@welearn.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
ssh's scp program is very nice:

  scp local-file user@remote.host:remote-filename

copies a local file to the remote host (connecting as "user") and saving
it as "remote-filename", which filename can be omitted if the filename
is to remain the same, as in:

  scp local-file user@remote.host:

just reverse the local/remote stuff to copy a remote file to the local
machine

some other examples of scp I've used:

  scp -r local-dir user@remote.host:remote-dir

(to copy the entire directory structure)

  scp 'user@remote.host:*' local-dir/

very useful tool and it gives you a nice warm feeling knowing the
transfers are encrypted to keep potentially sensitive data hidden from
prying eyes

every now and then it's nice to just use ssh to capture output to a
remote file, or to pipe a remote command's output to a local file, but
when doing so, be sure to add the "-e none" switch so that any data in
the stream won't trigger ssh's escape mechanism:

  ssh -e none -l user remote.host '/do/this/command -with-these-args' >
local.output.file

is handy as is

  ./run/this/perl/script | ssh -e none -l user remote.host 'cat >
remote.output.file'

anyway I thought that some real-life examples might help -- as usual,
the man pages are the real resource

Aaron out.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3508C558.1174639A>