Copying files from remote to local
# SCP SCP [email Protected]:/root/zbdata/api-148.log-2014090412.bz2/root/zbdata
Reported Warning:permanently added (RSA) to the list of known hosts error
Reason: When executing the SCP , the known_hosts file is not generated under the/root/.ssh of this machine .
Solution:
# Vi/etc/ssh/ssh_config
The last two lines are
Stricthostkeychecking No
Userknownhostsfile/dev/null
Comment out these two lines and save the file
Execute SCP SCP again [email protected]:/root/zbdata/api-148.log-2014090412.bz2/root/zbdata
Prompt appears
Theauthenticity of Host ' 10.1.11.210 (10.1.11.210) ' can ' t be established.
Rsakey fingerprint is a0:09:89:d2:3b:aa:91:60:59:7f:7f:bc:03:31:b0:09.
Areyou sure want to continue connecting (yes/no)?
After you enter Yes, you can see that the known_hosts file was generated in the/ROOT/.SSH directory:
[Email protected].ssh]# ls
Id_rsa id_rsa.pub known_hosts
Troubleshoot SSH logins in Linux warning:permanently added (RSA) to the list of known hosts