Delete host key from known_hosts file

I normally delete the known_hosts file on my machine (not server) when I ssh to a server because the fingerprint has changed. You can delete host’s key as follows.

ssh-keygen -R hostname
# Host hostname found: line 6
/Users/benjaminr/.ssh/known_hosts updated.
Original contents retained as /Users/benjaminr/.ssh/known_hosts.old

Of course, you don’t want to simply do this unless you are aware something changed.

Advertisements

You will not be able to login to ESXi 6 U2 with ssh-dss keys

I could not login to ESXi 6 host with my ssh keys. As root login with password was enabled, I could login using password. I checked for known symptoms. AuthorizedKeysFile points to the right location. AuthorizedKeysFile had my keys.

grep AuthorizedKeysFile /etc/ssh/sshd_config
AuthorizedKeysFile /etc/ssh/keys-%u/authorized_keys
cat /etc/ssh/keys-root/authorized_keys

What could be wrong?
Continue reading