5 Replies Latest reply: Jul 13, 2012 7:56 PM by BobHarris
daveyostcom Level 1 Level 1 (10 points)

The page should also say how to enable ssh login and how to make sshd see the change immediately.


Mac OS X (10.7.4)
  • 1. Re: ssh root login
    etresoft Level 7 Level 7 (24,265 points)

    That page should be deleted entirely.

     

    To enable ssh login all you need is to turn on Remote Access in System Preferences > Sharing

  • 2. Re: ssh root login
    Topher Kessler Level 6 Level 6 (9,340 points)

    ...and furthermore, enabling login for the root account is not needed. The account is already active, and can be used in the Terminal for nearly all purposes that would require it by using "sudo su" if a direct use of "sudo" does not work (for instance, when accessing and editing local directory contents).

  • 3. Re: ssh root login
    BobHarris Level 6 Level 6 (13,075 points)

    While I agree that directly logging into root is rarely needed thanks to 'sudo', it is possible to give the root account ssh-keygen keys and ssh into the root account WITHOUT needing to enable the root account's password.

     

    root ssh-keygen keys can be useful for remote tasks that need to connect to the system as root for things like remote backups (such as rsync over ssh).

  • 4. Re: ssh root login
    daveyostcom Level 1 Level 1 (10 points)

    rsync as root needs ssh root login.

    Or perhaps you can work out for us how to get around that with a bunch of rsync arguments.

  • 5. Re: ssh root login
    BobHarris Level 6 Level 6 (13,075 points)

    If you are using rsync over ssh to the root account, you do not need to give root a password, rather you can create ssh-keygen keys and put the origin system's .ssh/id_rsa.pub into the destination system's /var/root/.ssh/authorized_keys file.

     

    Now you can access the destination system without needing to enable the root password.

     

    If you google ssh keys, or even ssh passwordless logins, you will find lots of examples on how to set this up.