When you perform an ssh connection to a remote machine, the 1st time you will be prompted to say ‘yes’ to authenticate the remote host.
This feature is controlled by “StrictHostKeyChecking” parameter and it is set to yes by default. From security point of view, this option should be enable because protect you and your system against trojan horse attacks.
Sometimes you need disabling it temporarily. To disable it you can do via console or via config file.
Via console:
#> ssh -o 'StrictHostKeyChecking no' username@remotemachine
Via config file, adding below line to /etc/ssh_config (OSX) or /etc/ssh/ssh_config (linux):
StrictHostKeyChecking no
Once you turned it on, you can solve “offending key” deleting it from “~/.ssh/know_hosts” through this terminal command:
# sed -i '19d' ~/.ssh/known_hosts
where 19 is the line containing offending key.
If you have suggestions, troubles or you feel alone, comment this post!
Luca De Vitis 6:26 pm on July 29, 2011 Permalink |
ls -1 | while read file ; do mv -nv “${file}” “$(echo “${file}” | tr ‘[A-Z]‘ ‘[a-z]‘)” ; done
diegor 6:53 pm on July 30, 2011 Permalink |
Hi Luca, thanks for the trick.
I tried but it doen’t work.. I have this:
“namefile not overwritten”
It works only if I drop “-n” option from mv command (too risky!!)