Find the answer to your Linux question:
Results 1 to 5 of 5
So I followed this guide to disable root login on ssh Security Tip: Disable Root SSH Login on Linux - How-To Geek But it seems as if it didnt work. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    27

    Disabling Root SSH Login


    So I followed this guide to disable root login on ssh
    Security Tip: Disable Root SSH Login on Linux - How-To Geek

    But it seems as if it didnt work. I am still able to log in under my main account and type sudo su and it goes straight to root with no additional password.

    The article led me to believe I would have to log in with one password and type another password to do root actions.
    How do I achieve this?

  2. #2
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    What's your mail account ? - login to your main account before doing "su"
    run
    id
    and post its results here.
    Also check whether /etc/sudoers file has entry for your main account?


    If you want to disable root ssh login - Edit the file /etc/ssh/sshd_config
    make sure it as an entry like
    PermitRootLogin No
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  3. #3
    Just Joined!
    Join Date
    Jul 2008
    Posts
    27
    id gives this

    Code:
    uid=1000(weazol) gid=1000(weazol) groups=1000(weazol),4(adm),20(dialout),24(cdrom),46(plugdev),111(lpadmin),119(admin),122(sambashare)
    and the only thing listed in sudoers is root
    also I have the config file edited just like you mentioned

  4. #4
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,758
    Now try restart "sshd" and try to ssh as root.

    Is it still allowing you to ssh as root user?
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  5. #5
    Just Joined!
    Join Date
    Jul 2008
    Posts
    27
    no i cannot log in under the name "root"
    But if I log in using "weazol" I can type the exact same password to have root access.

    I want it to be were if someone bruteforces my password they still have another to go through to get root.

    EDIT: Never mind I am a noob. They both had the same password. I got it now, Thanks.
    Last edited by weazol; 03-18-2011 at 06:38 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
  •