Issue
I have several virtual machines installed on my computer, to which I connect via ssh:
ssh vm1@localhost
or
ssh vm2@localhost
So every time I connect to different vm I need to edit my ~/.ssh/known_hosts
file in order to get rid of: “WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
” message.
Is there any way to trust automatically all VMs on localhost?
Solution
In your configuration (e.g. ~/.ssh/config) you can trash the known hosts for a specific hostname:
Host localhost
HostName localhost
UserKnownHostsFile=/dev/null
StrictHostKeyChecking=no
Answered By - Quentin Answer Checked By - Timothy Miller (WPSolving Admin)