Here i have a problem in copying a file from one unix machine to another using scp command.
when i tried to execute the following command [code] scp /usr/tmp/abc.txt <some other ip>:/usr/tmp/ [code]
i got the prompting message below. [code] The authenticity of host '<some other ip>' can't be established. RSA key fingerprint is 1d:9d e e:5b:bb:ab:8e:ae:8c:87:fe:66:3f:c5:6b. Are you sure you want to continue connecting (yes/no)? [code]
I want to automate this process. is there any option or parameter do we need to pass along with this command? Or can we achieve this using shell script?
Originally posted by Philip Thamaravelil: IMO you'll have to setup ssh keys between the machines.. this will allow you to ssh and scp from one machine to another without a password prompt/security prompt.
Actually, that's not the OP's problem. He just needs to connect once and accept the server's RSA key.
Doing the full setup is handy, but really is a secondary consideration.
Joined: Feb 09, 2006
The title of this thread is 'How to automate the scp command?'
You must setup keys in order to automate a scp file transfer.