SSH key rejected after restoring config

Status
Not open for further replies.

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Here's my server:

FreeNAS 8.3.0 RELEASE p1 x64
Intel E5606 with 20GB of RAM
18x2TB in RAIDZ3

Due to an unrelated issue I chose to try reinstalling FreeNAS to a new USB and restore my config. The restore was flawless. However I found one issue. I was previously logging in as the root users using a username/key combo. I've been using it for more than a month, but my restore(which was from a config dated yesterday) doesn't seem to include the SSH key. I checked the SSH Public Key for root and it is blank.

When I tried to login a few mins ago using Putty I got the error "Server refused our key". I'm pretty green regarding the details of how SSH works internally.

Is this an expected behavior? Is there any particular reason why the key shouldn't be included with the config file? I would normally expect that the key would have been kept in the config file I saved, but since this deals with security I'm questioning if this is by design or by mistake. I'm just looking to validate if this is a bug so I can file an appropriate report.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
So I pulled out my old USB stick and tested it. Sure enough I can log in via SSH without entering a password. The "SSH Public Key" field is filled in with the appropriate key. So it appears that this field isn't being transferred when I imported my config file. So should I put in a ticket or shouldn't SSH Public Keys be imported for some reason?
 

SkyMonkey

Contributor
Joined
Mar 13, 2013
Messages
102
This may be completely unrelated, and either a proper feature or a bug, but it hopefully isn't too off topic given the thread, and may be useful as a data point.

I used the 'factory restore' function in the GUI, and found my root SSH key was NOT deleted from the install. It still appeared in the GUI, and I did not need to reenter it to be able to SSH in. Putty complained that the fingerprint of the server had changed, but I was able to login just as I had before. Seems a potential security risk to me.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm going to put in a ticket for this later. I'll provide a link as soon as I get the ticket submitted.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Status
Not open for further replies.
Top