Unable to add public key to user account.

Status
Not open for further replies.

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
Hello, I am trying to create a rsync pull job (for the first time) that will sync data from my WD my book live duo to my freenas.
If I read the instructions correctly I need to have a user ID that has a public key in the account in order to ssh to my WD nas.

I generated a public key on my WD my book live duo and want to paste it into the "SSH Public Key:" section of my user account on my freenas.
I pasted the key and try to save it but get the following error : "Home directory is not writable, leave this blank"

now I am confused.

guide that I am trying to follow is: http://mybookworld.wikidot.com/ssh-automatic-logon-multiple-users
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
Does the user on FreeNAS have a home directory specified? If not, create a UNIX dataset for you user and assign it as the home directory.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Hello, I am trying to create a rsync pull job (for the first time) that will sync data from my WD my book live duo to my freenas.
If I read the instructions correctly I need to have a user ID that has a public key in the account in order to ssh to my WD nas.

I generated a public key on my WD my book live duo and want to paste it into the "SSH Public Key:" section of my user account on my freenas.
I pasted the key and try to save it but get the following error : "Home directory is not writable, leave this blank"

now I am confused.

guide that I am trying to follow is: http://mybookworld.wikidot.com/ssh-automatic-logon-multiple-users
Freenas version should be included in this post.

But the solution is to give the user a proper home directory.

Sent from my XT1096 using Tapatalk
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
okey, I managed to setup a home directory and add the public key to the account and was able to save it.
I also used the shell to connect to the WD nas using the correct account. I was able to connect and got the question if I wanted to add the key. I typed yes.

The homedir now contains a folder with the user name, but it is not accessible even though I am logged into the drive with that user.
I retried to make a rsync job but get error:
  • In order to use rsync over SSH you need a user
    with a public key (DSA/ECDSA/RSA) set up in home dir.
I don't know how to enter that folder to check if there are any files in there.

p.s. Build freeNAS-9.2.1.5-RELEASE-x64 (80c1d35)
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
okey, I managed to setup a home directory and add the public key to the account and was able to save it.
I also used the shell to connect to the WD nas using the correct account. I was able to connect and got the question if I wanted to add the key. I typed yes.

The homedir now contains a folder with the user name, but it is not accessible even though I am logged into the drive with that user.
I retried to make a rsync job but get error:
  • In order to use rsync over SSH you need a user
    with a public key (DSA/ECDSA/RSA) set up in home dir.
I don't know how to enter that folder to check if there are any files in there.
How do you log into a drive? Hdds do not have the ability to log into them. What do you mean by these words, can you describe them better.

Do you want freenas to push data or do you want your other server to pull data? Adding the public key to freenas users allows for your other server to pull data.

Sent from my XT1096 using Tapatalk
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
How do you log into a drive? Hdds do not have the ability to log into them. What do you mean by these words, can you describe them better.

Do you want freenas to push data or do you want your other server to pull data? Adding the public key to freenas users allows for your other server to pull data.

Sent from my XT1096 using Tapatalk

with log into the drive I mean browse to the homedir i created using finder.

I want freenas to pull data from my wd nas. I configured the job to pull.
since it kept asking for the public key I added it to the account.
Did I do it the wrong way around?
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
tried something:
ssh'ed to the wd nas. Enabled ssh on freenas. Then from the wd nas ssh'ed to the freenas. asked to add the key, I answered yes. then something strange happend.

"Could not chdir to home directory /mnt/RaidzDisk/HomeDir/nas: Permission denied"

again it does not seem to have access to its own homedir.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
tried something:
ssh'ed to the wd nas. Enabled ssh on freenas. Then from the wd nas ssh'ed to the freenas. asked to add the key, I answered yes. then something strange happend.

"Could not chdir to home directory /mnt/RaidzDisk/HomeDir/nas: Permission denied"

again it does not seem to have access to its own homedir.
For freenas to pull data it needs the private key and the public key goes on the wd thing. Does your user own the home directory it's configured for?

Sent from my XT1096 using Tapatalk
 

Vincent Jansen

Explorer
Joined
May 16, 2014
Messages
82
okey I am going to try and add the freenas'ses private and public keys to the WD nas. Just need some time to figure out how.

I created the "homedir" folder myself. freenas added the "nas" folder inside the homedir folder after I added the location of the homedir to the user id. I have access to the homedir folder but no access to the user id "nas" underneath it. and I do not know how to get access to it.
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Is having a home directory required? I have no need for one and prefer it disabled if possible?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

indivision

Guru
Joined
Jan 4, 2013
Messages
806
I see. It looks like there is some kind of bug in the UI then.

I wasn't changing the SSH key at all. I was just adding an auxiliary group to a user and the "Home directory is not writable, leave this blank" error came up.

I was eventually able to get past it by highlighting the SSH field (which was already blank) clicking delete a few times and then clicking away.
 
Status
Not open for further replies.
Top