Is there any chance to skip the known_hosts check without clearing known_hosts or disable it in ssh.conf? I neither have access to known_hosts nor ssh.conf yet.
Don't find any suitable in man.
Asked
Active
Viewed 1.6e+01k times
98
Guy Avraham
- 171
burnersk
- 2,096
- 5
- 27
- 41
2 Answers
176
scp is supposed to take the same command line options as ssh, try:
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
Maybe add -q to disable the warnings as well.
Guy Avraham
- 171
arjarj
- 3,212
22
For those of us who are less versed in Linux shorthand, the full syntax would look something like this:
scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -r $source $user@$host:$destination
Lefty G Balogh
- 433
known_hostsfile is created once you have connected, so all should be fine. – glglgl Nov 13 '11 at 12:36