LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-09-2013, 01:17 PM   #1
hrohibil
LQ Newbie
 
Registered: Aug 2013
Posts: 16

Rep: Reputation: Disabled
Add another user account to the ssh keys?


Hi

Please advice.

I have made a succesfull login via putty and as a root account to my nas.

Now i want my own user account which i use to login to the nas web GUI, to login.

Can i somehow add my account name into the keys public??

I have tried from putty by just changing the auto-login name from root to my user account which is an administrator account, but i just get refused says "server refused our key", i use the same private key file path, i have only changed name from root to my user name account???
Br Hamid
 
Old 08-09-2013, 05:13 PM   #2
itlb
LQ Newbie
 
Registered: Aug 2013
Distribution: Debian
Posts: 29

Rep: Reputation: Disabled
Add another user account to the ssh keys?

hi,
So you have ssh set up to the root account of your NAS using keys and now you want to set up the same for a user account? to do this you will need to add your client users public key to the users ~/.ssh/authorized_keys file on the NAS, I gather you have already created the key from your original post?
 
Old 08-10-2013, 03:03 AM   #3
hrohibil
LQ Newbie
 
Registered: Aug 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
Yes i have allready made a keypair for my my root account which is located in /.ssh/authorized_keys file. How can i add another user to that authorized_keys file???

I can only login to the ssh with the root login credienttials... Even though i have a administrator account on my nas, it keeps saying keys refused when trying to login with that account...

Br Hamid
 
Old 08-10-2013, 04:28 AM   #4
olau
LQ Newbie
 
Registered: Jun 2006
Distribution: Debian Sarge ( lol I should generalize to: Debian Testing )
Posts: 15

Rep: Reputation: 1
ehem, did you setup "your own user account" - as you name it - on your NAS box? It looks like you did not! So do it.
Then as itlb suggested add the public key to ~/.ssh/authorized_keys
Look carefully, this is NOT /.ssh/authorized_keys
it shall be /home/<your own user account>/.ssh/authorized_keys (on the NAS).

This should bring you through....
 
Old 08-10-2013, 05:19 AM   #5
hrohibil
LQ Newbie
 
Registered: Aug 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
Hi

Thanks for a reply.

Okay, i think you are on to something here. As it is now I can only login to the NAS as a root user with ssh.

When i am logged in, i am the root/directory.
So you are saying that i log in as root user as normal, then go into the user account folder from home and inside the .ssh/authorized_keys file i edit and paste the same public key as i use for the root user i got from putty??

But if i log in as root, how can i then get to /home/<your own user account>/.ssh/authorized_keys ???

Really looking forward to your reply

Br Hamid
 
Old 08-10-2013, 02:20 PM   #6
hrohibil
LQ Newbie
 
Registered: Aug 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
Hi

PLEASE HELP ME!!!!!

As i was excided to come home and try out to add a nas account user instead of a root user to my nas, i get error message....

See attached file.

http://bilverdy.dk/HELP/puttyerror.png

Server Refused the key??

I mean yesterday it worked fine?? And since i only had that root acount to login with, how can i enter the nas and how can this happend when it worked fine???

I logged in to the nas from the Web GUI just check up on the firewall and system traffic logs to see if there was any unsual activity, everything was fine. I can only remember that after my las succesfull login yesterday night, i then rebooted both nas and later the router for some other reason.

Please advice....
 
Old 08-11-2013, 02:15 PM   #7
hrohibil
LQ Newbie
 
Registered: Aug 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by olau View Post
ehem, did you setup "your own user account" - as you name it - on your NAS box? It looks like you did not! So do it.
Then as itlb suggested add the public key to ~/.ssh/authorized_keys
Look carefully, this is NOT /.ssh/authorized_keys
it shall be /home/<your own user account>/.ssh/authorized_keys (on the NAS).

This should bring you through....
Okay, i got in with telnet and reastablished ssh connection by removing "AllowAllUsers myUseraccountname" i tried to allow the ssh to allow my user account.
So now i am inside ssh as a root, and i canīt find any /home/user/ folder? Is it because i am logged in as a root? If so how do then create an account from the root?
When i cd .. back to the very root folder, so behind my /root folder i am now just in / and from here there is a folder called /usr nothing usefull there.. Please advice
 
Old 08-12-2013, 02:41 AM   #8
olau
LQ Newbie
 
Registered: Jun 2006
Distribution: Debian Sarge ( lol I should generalize to: Debian Testing )
Posts: 15

Rep: Reputation: 1
of course you need to create that user on your NAS also. You shall go for some linux basics or at least basics for your NAS... before continuing.

Last edited by olau; 08-12-2013 at 02:44 AM.
 
Old 08-12-2013, 04:09 AM   #9
hrohibil
LQ Newbie
 
Registered: Aug 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
I allready have the user created from the nas it self. So when i login from the web gui there is no problem. Also i checked that the users home service are enabled and they were by default.
I just cant seem to access the nas with ssh other than root??

Last edited by hrohibil; 08-12-2013 at 04:11 AM.
 
Old 08-12-2013, 09:26 AM   #10
hrohibil
LQ Newbie
 
Registered: Aug 2013
Posts: 16

Original Poster
Rep: Reputation: Disabled
I finnaly got a username account setup without root.

What permissions should the folder /var and /services have-??

I have chown them to my username account.

Br Hamid
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SSH - How can I only allow a key pair login for my user account not root account? shanekelly Linux - Security 5 01-25-2013 10:45 AM
how do I add a user account in antiX? newbiesforever MEPIS 7 07-26-2011 06:10 PM
Add user keys to allow ssh Sinkeye Linux - Newbie 2 06-10-2011 07:36 AM
"To add a new user account, log in to the root account" how do i do this (im new) pierce77x Linux - Newbie 4 12-28-2008 03:44 PM
samba - add user script - User account does not exist itzamecwp Linux - Server 2 01-18-2007 11:52 PM


All times are GMT -5. The time now is 04:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration