Freenas GUI Overwriting ssh_known_hosts

Status
Not open for further replies.

Nofun

Cadet
Joined
Oct 25, 2015
Messages
4
I'm thinking this very well may be by design but this has now left me with some stale/incorrect keys that cannot be manually removed.

I can edit the file easy enough but after a few minutes all the old keys inside /etc/ssh/ssh_known_keys will reappear which is wreaking havoc with replication tasks in particular.

Is this function as expected? If so is there a way to get around this?

-Nofun
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421

Nofun

Cadet
Joined
Oct 25, 2015
Messages
4
Yes - adding keys on push pull for replication is pretty dam simple, but it's not my issue.

As soon as you add a replication task in the gui it populates the /etc/ssh/ssh_known_hosts file with ALL OLD keys as well as the new one.
Example -
I make a replication task going from 1.1.1.1 replicating to 2.2.2.2
I setup the key from 2.2.2.2 which is say ssh-rsa xxxyyyzzzz
Host 2.2.2.2 gets pulled down and a new install is made but on the same IP address of 2.2.2.2
As soon as a new replication task is made and the key has been scanned or entered manually you click ok and it will go and add the new key AND OLD keys to the file.

This of course makes it freak out and starts throwing warnings about a man in the middle attack.

It seems the gui reads this file from top down as the old keys are at the top and the new correct keys at the bottom.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You need to clean up your known_hosts file. Massive deleting the old replication task will do this? Am I understanding you correctly that you created a new freenas box on the same ip as the old one?
 

Nofun

Cadet
Joined
Oct 25, 2015
Messages
4
Yes - changing the IP creates too much work so the new box retained the old installs IP.

The whole point is I cannot clean up the known_hosts file as it gets overwritten but what I assume is the GUI.

Deleting the replication task did not help.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Sounds like you found a bug. Search to see if a bug like this exist at bugs.freenas.org and if not create a new one.
 
Status
Not open for further replies.
Top