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.5e+01k times
95
Guy Avraham
- 171
- 1
- 7
burnersk
- 2,056
- 5
- 27
- 39
-
what does "I neither have access to known_hosts nor ssh.conf yet. Don't find any suitable in man." mean? The `known_hosts` file is created once you have connected, so all should be fine. – glglgl Nov 13 '11 at 12:36
-
Hi glglgl, that known_hosts is a file from another service user and visudo is not working correctly. So I have no writeable access to known_hosts nor ssh.conf. There is a false signature within that known_hosts file. – burnersk Nov 15 '11 at 08:36
2 Answers
166
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
- 1
- 7
arjarj
- 3,101
- 1
- 17
- 10
20
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
- 413
- 4
- 8