|ssh is a protocol usually used to login to a system to alter files. It can also be used for file transfers between systems.|
scp is the software used to manage the ssh file transfer.
Let's make a few assumptions:
Push a file from A to BIf you want to push a file from A to B, you'd run:
scp -p -P 22 -C /path/to/A/local/file.txt firstname.lastname@example.org:/path/to/B/remote/file.txt
Pull a file from B to AThe same idea is used to download a file from remote box B to the local box A, just swap the values:
scp -p -P 22 -C email@example.com:/path/to/B/remote/file.txt /path/to/A/local/file.txt
For both upload and download, they will ask you for your password on B.
If needed (eg: for background crons), you can automate the login process so A can connect to B without a password using an RSA Key.
For cron scp calls, we've received a report that you may need to run:
pkill ssh-agentto clean up the scp calls.
|Automating ssh logins with an RSA key|
© 2018 JBMC Software, Suite 173 3-11 Bellerose Drive, St Albert, AB T8N 1P7 Canada. Mon-Fri 9AM-5PM MST