ssh host private key not working

Status
Not open for further replies.

Josh Noname

Cadet
Joined
Nov 1, 2014
Messages
7
Hello,

I have successfully configured ssh access with password and key authentication. Now, I would like to use a new key on the FreeNAS side. So, as indicated by the GUI, I pasted my brand new key in "Service > SSH > Host Private Key". When I try to SSH with a client, I get the message to check the fingerprint of the host:
Code:
The authenticity of host 'host (X.X.X.X)' can't be established.
RSA key fingerprint is OLD_FINGERPRINT.
Are you sure you want to continue connecting (yes/no)? 

However, the fingerprint is still the same as the one before I pasted the Host Private Key in the GUI.
Is there something I am missing?
 

Josh Noname

Cadet
Joined
Nov 1, 2014
Messages
7
Does anyone have the same issue?
Do you manage to generate and use your own SSH key for the FreeNAS server? How?
 

Josh Noname

Cadet
Joined
Nov 1, 2014
Messages
7
No, I have no idea what is wrong!
 

Josh Noname

Cadet
Joined
Nov 1, 2014
Messages
7
I just reinstalled FreeNAS (FreeNAS-9.2.1.8-RELEASE-x64 (e625626)) from scratch and I still have the same problem.

I generated my key with the shell console included in the FreeNAS web interface:
Code:
ssh-keygen -t rsa -b 4096

Then I copied the private key in "Service > SSH > Host Private Key"
Code:
-----BEGIN RSA PRIVATE KEY-----
...
...
...
-----END RSA PRIVATE KEY-----

Then I checked that the key fingerprint showed after key generation was the same as when running the following command:
Code:
ssh-keygen -l -f id_rsa

and it was the same:
Code:
4096 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx  root@hostname (RSA)

(of course it was not showing xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx but the real fingerprint of the generated key instead)

But then, when I try to connect with a client, this is what I have:
Code:
$ ssh hostname
The authenticity of host 'hostname (A.B.C.D)' can't be established.
RSA key fingerprint is yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy.
Are you sure you want to continue connecting (yes/no)?

(of course it was not showing yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy but the real fingerprint of some key instead)

So, why is my client showing yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy:yy instead of xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx?
 
D

dlavigne

Guest
Sounds like a bug. Please create an issue at bugs.freenas.org and post the issue number here.
 
Status
Not open for further replies.
Top