1835267 Members
2550 Online
110078 Solutions
New Discussion

scp issue

 
SOLVED
Go to solution
Dewa Negara_4
Regular Advisor

scp issue

Hi All,

I have an issue when I am trying to run scp using private/public keys. Everytime I run scp for the first time, it always prompt me to type "yes" or "no" manually for RSA key fingerprint :

[secumgr@test-box:/home/secumgr/.ssh]
$ scp -q authorized_keys sihp8024:/home/secumgr/.ssh/authorized_keys
The authenticity of host 'sihp8024 (15.1.25.2)' can't be established.
RSA key fingerprint is 99:f8:00:6c:d8:3d:1b:01:3f:16:99:21:a5:98:c9:c3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'sihp8024,15.1.25.2' (RSA) to the list of known hosts.

This is hard for me because I have more than 200 servers that need to run scp. Is there anyway to do it automatically without typing it manually? or can we avoid to add fingerprint of the server to known_hosts file?

Pls help. High score will be given.

Thanks and Best Regards,
Dewa
Santos
3 REPLIES 3
Denver Osborn
Honored Contributor
Solution

Re: scp issue

Add the "-o StrictHostKeyChecking=no" option to your scp or ssh syntax. This will bypass the lookup in known_hosts file.

Hope this helps,
-denver
Denver Osborn
Honored Contributor

Re: scp issue

Doh! I didn't mention that using this option basically answers "yes" for you and adds the host to your ~/.ssh/known_hosts file.

-denver
Dewa Negara_4
Regular Advisor

Re: scp issue

Hi Denver,

Thanks alot for your great help.

The options was working well and it added fingerprint key automatically to known_hosts file.This option really helps me alot.

Thanks again.

Best Regards,
Dewa
Santos