Results 1 to 8 of 8
Thread: Securing SSH issue
-
05-19-2011, 04:55 PM #1Web Hosting Master
- Join Date
- Jul 2010
- Location
- Close 2 U
- Posts
- 567
Securing SSH issue
Hi guys ...
I moved to SSH-RSA-keys method instead of the usual root-password authentication ...
but I want the SSH-RSA-keys method to login to a none SU user then I may SU ..
I created a new user "admin" with password and I add it manually to the /etc/group "wheel"
I can login as admin then su ... but the SSH-RSA-keys method not working .. I changed the private key owner.group to admin.admin
but still not ok ...
advise ?
Not as that Much Expert
I'm just a "LostEagle"
_-_-_-_-_-_-_-_-_-_-_-_-_
-
05-20-2011, 02:15 AM #2Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
I guess that you have missed something.
What steps were you following? You did copy the keys to the server, right?David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
05-20-2011, 03:23 PM #3Web Hosting Master
- Join Date
- Jul 2010
- Location
- Close 2 U
- Posts
- 567
ok ...
I create a user called admin
useradd admin
I grant a password:
passwd admin xxxxx
I modified the group file, /etc/group
and added him to the wheel line
i created the .ssh dir
I put their the publick key
I put the private key with my putty ...
I can login using Pu-Pr key ass root
but what i want is too login as admin the su- to be root
so, I chown the Pu-key as admin.admin
but, the admin fail to login with the key .. while the root still able to do ..
advise ... whats missing ?
Not as that Much Expert
I'm just a "LostEagle"
_-_-_-_-_-_-_-_-_-_-_-_-_
-
05-20-2011, 09:56 PM #4Total Nerd
- Join Date
- Feb 2007
- Location
- Florida
- Posts
- 1,932
Is there any error in your secure.log/auth.log/whateveryoursshlogsto.log?
Did you try using -d when logging in to see if you see any errors?
Did you set the correct permissions for your files/folders (chmod 0700 .ssh && chmod 0600 .ssh/*)?
Did you change the public key owner to admin (chown -R admin:admin .ssh)?-Joe @ Secure Dragon LLC.
+ OpenVZ Powered by Wyvern | KVM | cPanel Hosting | Backup VPSs | LowEndBoxes | DDOS Protection
+ Florida | Colorado | Illinois | California | Oregon | Georgia | New Jersey | Arizona | Texas
-
05-21-2011, 02:45 AM #5Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
Make sure the permissions are set as follows. Most probably the permission on home directory (/home/admin) will be wrong.
* Permissions
authorized_keys and authorized_keys2 --> 600
.ssh --> 700
Home Directory --> 711
Keys (id_dsa,id_rsa) --> 600
Public Keys (id_dsa.pub,id_rsa.pub) --> 644David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
05-21-2011, 10:34 AM #6Web Hosting Master
- Join Date
- Jul 2010
- Location
- Close 2 U
- Posts
- 567
Using username "admin".
Server refused our key
----------
guys this was working as root access via the keys .. but i want to access as admin the su as root ..
-------
all permissions - owners are ok ...
but should I move the .ssh dir to the /home/admin ?
Not as that Much Expert
I'm just a "LostEagle"
_-_-_-_-_-_-_-_-_-_-_-_-_
-
05-23-2011, 08:10 AM #7Web Hosting Master
- Join Date
- May 2008
- Location
- Germany
- Posts
- 680
Did you copy over .ssh/authorized_keys from root's home directory to admin's home directory?
EDIT: Don't move the entire .ssh directory, just copy or move authorized_keys and make sure the owner and file permissions are okay.█ CoderJosh | Web Application Developer and Linux Server Admin
█ Web & Mobile App Coding | Troubleshooting | Tuning | Hardening | SysAdmin Services
█ https://www.coderjosh.com/
-
05-23-2011, 08:40 AM #8Web Hosting Master
- Join Date
- Jul 2010
- Location
- Close 2 U
- Posts
- 567
ops ... i was missing some thing ...
thanks a lot ... its working well
i appreciate your help guys ..................
Not as that Much Expert
I'm just a "LostEagle"
_-_-_-_-_-_-_-_-_-_-_-_-_
Similar Threads
-
ssh issue
By gate2vn in forum Hosting Security and TechnologyReplies: 11Last Post: 07-01-2006, 08:31 PM -
Securing SSH: protocol SSH2 and hiding the direct access of root
By manuel_accu in forum Hosting Security and Technology TutorialsReplies: 0Last Post: 06-03-2006, 06:20 AM -
SSH Issue
By Pryach in forum Dedicated ServerReplies: 8Last Post: 10-29-2005, 03:47 PM -
SSH Issue
By Tamranda_Ankit in forum Hosting Security and TechnologyReplies: 9Last Post: 08-23-2004, 07:42 AM -
Securing /home/sites from SSH/telnet users
By afriq in forum Dedicated ServerReplies: 0Last Post: 10-11-2001, 07:46 AM