Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, How to login through ssh command without entering root password? what will be the command to login without root password Regards Gulam navi...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2011
    Posts
    7

    ssh remote machine without root password?


    Hi,

    How to login through ssh command without entering root password? what will be the command to login without root password

    Regards
    Gulam navi

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,387
    Search google for "ssh authorized_keys"

    Also, imho it is not encouraged to log in as root, because
    a) You loose information who actually logged in. Can be anyone with the root credentials.
    In contrast: If root login is disabled, then there is first a user login, that then may be escalated.
    b) An attacker would only need one token instead of two to get root
    c) the possible impact of remote comands is limited, if a regular user is used.
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Jul 2011
    Posts
    1
    here are the instruction to login without password:

    ssh-keygen # to generate a pair of keys

    place the content of id_dsa.pub into the file /root/.ssh/authorized_keys (on the remote server). Also, run chmod 700 /root/.ssh/authorized_keys, to be sure that other users cannot see it.

    The path /root/.ssh may not exists. In this case, just create the .ssh path first.

    when you run ssh root@remote-server, the server ssh will verify the file /root/.ssh/authorized_keys to see if it can allow the login without password.


    There is some cool trick you can do with ssh on this post diogomelo.net/blog/09/ssh-tricks . Have fun


    Quote Originally Posted by gulamnavi View Post
    Hi,

    How to login through ssh command without entering root password? what will be the command to login without root password

    Regards
    Gulam navi

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    This has been made trivial to do with the ssh-copy-id script, which should be included with your OpenSSH package.

    Also, don't forget to set PermitRootLogin to yes in /etc/ssh/sshd_config (and restart the daemon).

Posting Permissions

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