ssh_host_rsa_key.pub file is missing

Status
Not open for further replies.

topias5

Cadet
Joined
Mar 14, 2015
Messages
5
I'm trying to create a new replication task to remote Freenas machine but I've had some problem with permissions.
There's an error in the replication task "Permission denied, public key, password". I re-check rsa keys and figured out ssh_host_rsa_key.pub file is totally missing at /etc/ssh folder. A private file ssh_host_rsa_key is exist (without .pub extension).

How can I recreate these keys? What could be the reason why the key is missing? I have done a succeed replication task for other computers already and I didn't have this kind of problem.
 
D

dlavigne

Guest
Which version of FreeNAS? Please post a listing of /etc/ssh either in code tags or as a screenshot.
 

topias5

Cadet
Joined
Mar 14, 2015
Messages
5
Hi,
Version is FreeNAS-9.3-STABLE-201503071634

ls -l /etc/ssh
total 300
drwxr-xr-x 2 root wheel 520 Mar 14 18:24 ./
drwxr-xr-x 25 root wheel 4840 Mar 14 18:23 ../
-rw-r--r-- 1 root wheel 242153 Mar 10 17:28 moduli
-rw-r--r-- 1 root wheel 45 Mar 10 17:28 ssh_config
-rw------- 1 root wheel 668 Mar 14 18:34 ssh_host_dsa_key
-rw-r--r-- 1 root wheel 608 Mar 14 18:34 ssh_host_dsa_key.pub
-rw------- 1 root wheel 227 Mar 14 18:34 ssh_host_ecdsa_key
-rw-r--r-- 1 root wheel 180 Mar 14 18:34 ssh_host_ecdsa_key.pub
-rw------- 1 root wheel 411 Mar 14 18:34 ssh_host_ed25519_key
-rw-r--r-- 1 root wheel 100 Mar 14 18:34 ssh_host_ed25519_key.pub
-rw------- 1 root wheel 983 Mar 14 18:34 ssh_host_key
-rw-r--r-- 1 root wheel 648 Mar 14 18:34 ssh_host_key.pub
-rw------- 1 root wheel 1679 Mar 14 18:34 ssh_host_rsa_key
-rw-r--r-- 1 root wheel 1367 Mar 14 18:34 ssh_known_hosts
-rw-r--r-- 1 root wheel 314 Mar 14 18:34 sshd_config

I have built another system with the same Freenas source and everything works properly there, so there must have been some action in the current system what has caused a loss of the public key file.
 
D

dlavigne

Guest
That is weird. Out of curiosity, if you go to System -> Update -> Verify Install does it make note of the missing file?

As for a solution, do you have to use RSA keys?
 

topias5

Cadet
Joined
Mar 14, 2015
Messages
5
The system didn't find any missing files by Verify Install -tool. I updated the latest version from System > Update to FreeNAS-9.3-STABLE-201503150158 and the public key file is still missing.

I would like to create a replication task where the machine would be the PULL side and according to the guidance of Freenas the missing file should be used as the public key for the operation.
 
D

dlavigne

Guest
This command (from Shell) should regenerate the hostkey: ssh-keygen -t rsa
 

topias5

Cadet
Joined
Mar 14, 2015
Messages
5
The command will generate id_rsa and id_rsa.pub files under /root/.ssh folder. Can I use the generated public file and copy it to /etc/ssh/ssh_host_rsa_key.pub?
 

pzi123

Cadet
Joined
May 29, 2014
Messages
6
it is a year later and I see the same issue in
Build FreeNAS-9.10.1 (d989edd)

Does this mean 9.10 is not ready for consumption yet?
 

pzi123

Cadet
Joined
May 29, 2014
Messages
6
found the issue - to turn the sshd on you cannot select left side bar menu - this fails if sshd is not turned on with the top pulldown menu "services". This top one generates the keys.
 
Status
Not open for further replies.
Top