Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2010
    Location
    Close 2 U
    Posts
    567

    Post 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"
    _-_-_-_-_-_-_-_-_-_-_-_-_

  2. #2
    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

  3. #3
    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"
    _-_-_-_-_-_-_-_-_-_-_-_-_

  4. #4
    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

  5. #5
    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) --> 644
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  6. #6
    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"
    _-_-_-_-_-_-_-_-_-_-_-_-_

  7. #7
    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/

  8. #8
    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

  1. ssh issue
    By gate2vn in forum Hosting Security and Technology
    Replies: 11
    Last Post: 07-01-2006, 08:31 PM
  2. Securing SSH: protocol SSH2 and hiding the direct access of root
    By manuel_accu in forum Hosting Security and Technology Tutorials
    Replies: 0
    Last Post: 06-03-2006, 06:20 AM
  3. SSH Issue
    By Pryach in forum Dedicated Server
    Replies: 8
    Last Post: 10-29-2005, 03:47 PM
  4. SSH Issue
    By Tamranda_Ankit in forum Hosting Security and Technology
    Replies: 9
    Last Post: 08-23-2004, 07:42 AM
  5. Securing /home/sites from SSH/telnet users
    By afriq in forum Dedicated Server
    Replies: 0
    Last Post: 10-11-2001, 07:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •