This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
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?
How about: [ November 04, 2008: Message edited by: Charles Lyons ]
Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / AmazonAmazon UK )
Srikanth Kumar
Ranch Hand
Joined: Jun 04, 2008
Posts: 36
posted
0
No. it also does not work. It still prompting yes/no option.
To get rid of the prompt, type "yes" and the host will be added to the ssh known_hosts file. You won't be asked again unless the security signature of either the client or server changes.
To avoid even being asked the question - and the password prompt, add a security certificate to the client's ssh configuration.
For details, check out the full documentation of the SSH (openssh) command [ November 05, 2008: Message edited by: Tim Holloway ]
Customer surveys are for companies who didn't pay proper attention to begin with.
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.
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.
Philip Thamaravelil
Ranch Hand
Joined: Feb 09, 2006
Posts: 92
posted
0
The title of this thread is 'How to automate the scp command?'
You must setup keys in order to automate a scp file transfer.