[NBLUG/talk] Syntax of scp
Todd Cary
todd at aristesoftware.com
Sun Feb 29 08:12:01 PST 2004
Mitch -
My goal is to tar ( -czvf ) /home /etc/passwd and /etc/shadow, scp it to
my temporary computer that has a new Fedora Core 1 OS installed. Then I
want to untar the file and have the temporary computer handle the work
while I rebuild my production system.
Never having done this before, I am not sure if the relative paths will
be restored when I untar the file.
Todd
Mitch Patenaude wrote:
> scp has an argument structure that is (purposefully) the same (or
> really a subset) as that of rcp. It was thought of as a drop-in
> replacement.
>
> So.. the syntax for destination (or source) files is
>
> [[user@]hostname:]path
>
> without the syntactic key of the :at the end, the parser was treating
> it just like a filename since 192.168.0.12 is valid file name. If
> neither of the source and destination are "remote", it behaves just
> like cp.
>
> And you can specify multiple sources and one destination, all on
> different machines, e.g.:
>
> scp calisto:index.html john at europa:/tmp/logo.png
> widgets at www.example.com:public_html/NewProducts/.
>
> If you specify more than one host.. the authentications happen in the
> order they appear on the command line. I like to set up
> $HOME/known_hosts with keys so that authentication is automatic, but
> it will fall back on password authenication.
>
> Something else to note: If there is no path, or if the path is
> relative, then it's interpreted as relative to the home directory of
> the user. If the file isn't in the home dir, you can use an absolute
> path.
>
> -- Mitch
>
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/mailman/listinfo/talk
>
>
--
More information about the talk
mailing list