AzN_DJ Posted August 5, 2014 Share Posted August 5, 2014 Hi there, This is mainly an issue of a multi boot system: When you have people ssh-ing into your computer, but you are running different operating systems, the ssh host keys are mismatched. As known_hosts are kept on the client, being being mismatched will end up with a rejected connection claiming that you could be the victim of a man in the middle attack (and because it is my computer and I know what I am doing, I can assure that is not the case). The solution to this is to make sure that the ssh host keys are identical from OS to OS. However, I don't know where they are stored in OS X. Would anyone know where to find them? (Also using Yosemite - shouldn't make a difference though) Link to comment https://www.insanelymac.com/forum/topic/300067-where-are-ssh-host-keys-located/ Share on other sites More sharing options...
StoneTemplePilots Posted August 5, 2014 Share Posted August 5, 2014 Hi there, This is mainly an issue of a multi boot system: When you have people ssh-ing into your computer, but you are running different operating systems, the ssh host keys are mismatched. As known_hosts are kept on the client, being being mismatched will end up with a rejected connection claiming that you could be the victim of a man in the middle attack (and because it is my computer and I know what I am doing, I can assure that is not the case). The solution to this is to make sure that the ssh host keys are identical from OS to OS. However, I don't know where they are stored in OS X. Would anyone know where to find them? (Also using Yosemite - shouldn't make a difference though) I'd check for ~/.ssh/known_hosts best regards Link to comment https://www.insanelymac.com/forum/topic/300067-where-are-ssh-host-keys-located/#findComment-2048626 Share on other sites More sharing options...
AzN_DJ Posted August 5, 2014 Author Share Posted August 5, 2014 ~/.ssh/known_hosts is stored on the client side, and is what is used to authenticate each time. Deleting the known hosts file on the client side isn't exactly the long-term solution I would be looking for, because that has to be done on every computer I ssh from. The idea is that I am ssh-ing TO the dual boot Mac/Linux computer, and the ssh host key. Hence the private keys need to be identical. On linux, they are stored under /etc/ssh as ssh_host_dsa_key, ssh_host_ecdsa_key, ssh_host_rsa_key (and the equivalent public keys). On Mac? No idea. Link to comment https://www.insanelymac.com/forum/topic/300067-where-are-ssh-host-keys-located/#findComment-2048631 Share on other sites More sharing options...
AzN_DJ Posted August 5, 2014 Author Share Posted August 5, 2014 Ok I have found the answer: All the SSH keys are stored under: /etc/ Why didn't I think of that earlier? so ssh_host_dsa_key etc are located there. (I'll put this up for those linux users here) Link to comment https://www.insanelymac.com/forum/topic/300067-where-are-ssh-host-keys-located/#findComment-2048734 Share on other sites More sharing options...
Recommended Posts