Changes between Version 4 and Version 5 of SystemAdministration/Security/OpenSSH


Ignore:
Timestamp:
07/21/15 12:35:37 (9 years ago)
Author:
Sander Maijers
Comment:

Fix, elaborate root login

Legend:

Unmodified
Added
Removed
Modified
  • SystemAdministration/Security/OpenSSH

    v4 v5  
    5151Match originalhost B user root
    5252    IdentityFile "%d/.ssh/keypairs/root@B"
    53 Match originalhost B user sanmai
     53    ProxyCommand ssh yourusername@B -W %h:%p
     54Match originalhost B user yourusername
    5455    IdentityFile "%d/.ssh/keypairs/yourusername@B"
    5556}}}
     
    6162PermitRootLogin no
    6263
    63 Match LocalAddress 127.0.0.1
     64Match Address {WAN-IP-B}
    6465    PermitRootLogin without-password
    6566}}}
    6667
    67 Or to be compatible with IPv6 (untested):
    68 `/etc/ssh/sshd_config`:
    69 {{{
    70 PermitRootLogin no
     68Replace {WAN-IP-B} with the WAN IP address of B (as in, the IP address that A uses to refer to B). Restart the OpenSSH daemon.
    7169
    72 Match LocalAddress 127.0.0.1,::1
    73     PermitRootLogin without-password
    74 }}}
     70You now have the following setup:
    7571
    76 Restart the OpenSSH daemon.
     72[[Image(https://trac.clarin.eu/attachment/wiki/ssh_key/OpenSSH%20root%20config.png)]]
    7773
    7874== Logging in ==
     
    8682`rsync root@B:/etc/hostname /tmp/hostname`
    8783
     84== Final remarks ==
    8885'''Only use the root private key when it's absolutely necessary.'''
    8986