root SSH OK, personal-user SSH not OK (ssh & authorized_key)

Status
Not open for further replies.

JayG

Cadet
Joined
Dec 11, 2011
Messages
3
Hello everybody,
I try to authenticate me in SSH (with private/public keys) on me freenas server with a personnal account.

I firstly tried with my root acccount
// On my freenas
# touch /.shh/authorized_keys
# chmod 777 /.shh/authorized_keys
# ssh-keygen
# cat id_rsa.pub >> ~/.ssh/authorized_keys

# cp id_rsa -> clientMachine
ssh connection with private key -> Works !

I created a new user :
Account name : backup
Login shell : sh
Primary group : guest
Secondary group : ftp
Home directory : /home/nas/backup

I firstly did the same thing in root (create a private/public key, add it to authorized_key)
But I can't authenticate me with the private key
I secondly did it with the backup account (connection in ssh to the serveur with backup account and create private/public key with this account) but it doesn't work neither...

Do you know what could be the problem ?
Thank you
 

Caesar

Contributor
Joined
Feb 22, 2013
Messages
114
I've had problems with ssh keys where the public key had an extra space or wrapped to the next line. Cat your authorized_keys and make sure everything is on one line. also compare the failing key with the root key that works. that's all I can think of... hope it helps
 
Status
Not open for further replies.
Top