How to use scp
and ssh
command in a same script? First I have to copy one file from my local server to remote. Then from local server itself, I have to check the size of the copied file.
Take the 2-minute tour
×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
I would use public/private key to automate the conection without the need of using a password. |
|||||||||
|
rsync
to handle the copy and checking withssh
as its backend, then set up a passwordless public/private authentication key for rsync to use. Keep the private key in a directory accessible only to the userid running the rsync script. Done. – Shadur Feb 7 at 9:25