Nice, Ben.

Two things to add:
.) -p option on scp will preserve attributes as well
.) if security is not a concern (on a local home network), you can omit the '-e "ssh -l username"' and simply provide the remote user name (if different that the current user name) like '[email protected]:/dest/location' The transfer would be a little more efficient (but not necessarily faster) w/out encryption.

Ben Trussell wrote:
If you need to preserve attributes such as uid/gid (owner, group) and
timestamps etc, you can use rsync:

  rsync -av -e "ssh -l username"  /some/dir/locationA
remote.host.name:/dest/location

preserving extended attributed and ACLs?  try using

  rsync -avAX -e "ssh -l username"  /some/dir/locationA
remote.host.name:/dest/location

Want to try it out first to see what *would* happen (test run)?

  rsync --dry-run -avAX -e "ssh -l username"  /some/dir/locationA
remote.host.name:/dest/location

On Tue, Aug 3, 2010 at 11:20 AM, Bryan O'Neal
<[email protected]> wrote:
With SCP only one box has to run an SSH server and it does not mater
which, destination or source, but it does change the syntax.

On Tue, Aug 3, 2010 at 11:18 AM, [email protected]
<[email protected]> wrote:
There is not a "command to copy files from computer A to computer B when ssh
logged in...", but you can use SSH as a "transport" (regardless of which
computer you are logged-in-how, providing the the destination computer is
running an SSH server and you have the appropriate credentials) using:
Scenario 1:
scp u...@remotebox:/file/I/want /where/I/want/it
or
Scenario 2:
scp /file/I/want u...@remotebox:/where/I/want/it
YMMV...   :)
ET

[email protected] writes:
What is the correct command syntax to copy files from computer A
to computer B when ssh logged in to comuter B from computer A?

---------------------------------------------------
PLUG-discuss mailing list - [email protected]
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list - [email protected]
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

---------------------------------------------------
PLUG-discuss mailing list - [email protected]
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss



--
-Eric 'shubes'

---------------------------------------------------
PLUG-discuss mailing list - [email protected]
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss

Reply via email to