Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Apr 09, 2015 5:30 am 
Offline
Senior Newbie

Joined: Thu Apr 09, 2015 5:19 am
Posts: 6
Hello,

I've done the SSH key and it works well with the user root, but it doesn't work for other users. If I log in as another user, it always says"Server refused our key" and ask password. How to solve it? The key only works for root??

Thank you!


Top
   
PostPosted: Thu Apr 09, 2015 6:03 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Have you added they key to the authorized_keys file for the user you're trying to log in with?

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Thu Apr 09, 2015 10:34 pm 
Offline
Senior Newbie

Joined: Thu Apr 09, 2015 5:19 am
Posts: 6
obs wrote:
Have you added they key to the authorized_keys file for the user you're trying to log in with?


Hi Obs,

Thanks for the explanation!

I've done the ssh key jobs for the user "root" and it works well. I'm not sure of these three things:
1, The ssh key pair only works for one user? Do I need to create another pair for other users I'd like to log in with? Like one ssh key pair=one user?
2, If one ssh key pair supports multiple users, how to add/delete users to share/not share this ssh key pair?
3, Or both 1&2 are right method to do with SSH key connection?

Thank you!


Top
   
PostPosted: Fri Apr 10, 2015 4:40 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Each key pair can be used for any number of users on any number of servers, how you deal with it is up to you. A common practice is to have one ssh key per person and add that key to the servers/users they need access to.

If you want to have a key for both root and lets say the user bob then you copy that key into /root/.ssh/authorized_keys and /home/bob/.ssh/authorized_keys that's it :)

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Fri Apr 10, 2015 5:33 am 
Offline
Senior Newbie

Joined: Thu Apr 09, 2015 5:19 am
Posts: 6
obs wrote:
Each key pair can be used for any number of users on any number of servers, how you deal with it is up to you. A common practice is to have one ssh key per person and add that key to the servers/users they need access to.

If you want to have a key for both root and lets say the user bob then you copy that key into /root/.ssh/authorized_keys and /home/bob/.ssh/authorized_keys that's it :)

Loud and clear! :D I've done the job. Thank you!

chown -R bob:bob .ssh


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group