Jump to content
4 posts in this topic

Recommended Posts

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

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

~/.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.

×
×
  • Create New...