Authorized_Key vanishes...

Status
Not open for further replies.

herger

Cadet
Joined
Jun 27, 2017
Messages
2
hi all!!

I am new for this forum.
I have many issues with FreeNAS. I am not using the GUI, I am using it through ssh.
1) I need to access without putting the password. I have created the
id_rsa.pub file on the source computer and appended it through cat in my FreeNAS server.
The problem is that this is the third id_rsa.pub file that I append and it is always erase automatically from the system after few minutes...
It seems that only two authorized keys can be handled: is it true??
2) If I start a rsync process in remote, via ssh, I see that this process lasts for maximum 20 minutes, then it is reset...
I have already changed the
/etc/ssh/ssh_config file in the following way:
Code:
ServerAliveCountMax 700

ServerAliveInterval 100

ClientAliveInterval 120

ClientAliveCountMax 720

UseRoaming no

~

but nothing changes... It seems like a timeout problem, as the log file says
Code:
rsync error: unexplained error (code 255) at rsync.c(551) [sender=3.0.9]

but I cannot fix it...
Can anyone help, please?

Thanks and regards

H
 
Last edited by a moderator:
D

dlavigne

Guest
For configuration purposes, you have to use the GUI as that is the only way your changes are saved to the configuration database. Anything you do from the command line is not saved.
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
Welcome to the forums!

Please post your full system specifications per the Forum Rules.

Are you logging in as root or as another user? If you're logging in as root, you will need to configure the SSH service in the GUI to allow 'Login as root with password' and in any case you should enable 'Allow password authentication' just long enough to log in once and let the system add your workstation to the known_hosts. You've probably already done this. You can change these settings later, once everything is working.

There are no limits on the number of keys you can store in ~/.ssh/authorized_keys. Make sure this file has permission settings of 0600. I have no idea why this file would 'disappear'...

I've never had to modify the /etc/ssh/ssh_config settings, so you probably ought to restore that file to its original values. Chances are that your changes will be overwritten during the next FreeNAS upgrade anyway.

Good luck!
 

herger

Cadet
Joined
Jun 27, 2017
Messages
2
Hi all!

Thanks.
I have used the GUI to paste the id_rsa.pub key and checked that the permissione of .ssh/authorized_keys are set to 600.
The problema permain:
- the aithorized key (the third in the file) is lost;
- the rsync process via ssh stops after a couple of hours: I have to sync 1.7 Tb of files, I have synced 470 Gb....

Do You have clues?? :( :( :(

Thanks and regards

H
 

Spearfoot

He of the long foot
Moderator
Joined
May 13, 2015
Messages
2,478
Again, please post your full system specifications per the Forum Rules. Also, please describe exactly what you're trying to do, and how you're trying to do it.

It's very difficult for us to help you if you don't give us as much information as possible.

1) I need to access without putting the password. I have created the
id_rsa.pub file on the source computer and appended it through cat in my FreeNAS server.
The problem is that this is the third id_rsa.pub file that I append and it is always erase automatically from the system after few minutes...
It seems that only two authorized keys can be handled: is it true??
2) If I start a rsync process in remote, via ssh, I see that this process lasts for maximum 20 minutes, then it is reset...

Do you have two FreeNAS servers? If so, which one is the source and which one the target? On which FreeNAS server are you initiating the rsync transfer?

Or are you trying to synchronize two pools on the same FreeNAS server?

What user account are you using? If you're not using root, is it possible that the user's home directory (and therefore the user's authorized_keys file) is being over-written during the transfer?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
What version of freenas? Sounds like a bug if the key doesn't get set.

Sent from my Nexus 5X using Tapatalk
 
Status
Not open for further replies.
Top