Please post the exact command used.
The general format for scp is just like rcp:
Code:
scp /path/to/source/file username@IP:/path/to/destination/
Or
Code:
scp username@IP:/path/to/source/file /path/to/destination/
To see more information, add a few -vvv to the command:
Code:
scp -vvv /path/to/source/file username@IP:/path/to/destination/
Filename globbing can be used for the source.
Code:
scp username@IP:/path/to/source/file*txt /path/to/destination/
The trailing / on the destination isn't required, but commands like rsync get picky about that.
The source requires for the userid to have "read" access to the directory and files.
The destination requires for the userid to have "write" access.
These access controls follow the standard Unix model.
scp has a recursive mode.
sftp works the same way, but most Linux desktop file managers will support URLs: sftp://username@IP/path/to/source/ with drag-n-drop between 2 windows of the same file manager supported. It works as you'd want. Local to local, local to remote, remote to local, and remote -to- remote.
rsync automatically used ssh.
If different the username on both systems is the same, then no need to include it in the commands.
If a port other than 22/tcp is used, the different commands support a -p or -P option. Always look up which for the command -----or----- just setup a ~/.ssh/config file with a stanza for the connection parameters and alternate port. All ssh, scp, sftp, rsync, rdiff-backup and 50 other commands honor the config file and port, username, host settings so you'll never actually need to know or use them in any command line again. An example:
Code:
host pi3
user osmc
port 62280
hostname 192.168.55.32
So, if I use
Code:
scp /etc/hosts pi3:
and on my current desktop my usename is "thefu", the command used will become
Code:
scp -P 62280 /etc/hosts osmc@192.168.55.32:
automatically. I don't need to know or remember the IP, username, or non-standard port. It will do the same for ssh, sftp, rsync and 50 other ssh-based tools.
Bookmarks