I need to set PermitRootLogin no in Solaris 10 server, while still allowing two "peer" servers to have root access via ssh.
How can I achieve this?
I need to set PermitRootLogin no in Solaris 10 server, while still allowing two "peer" servers to have root access via ssh.
How can I achieve this?
Adding the below lines in the end of /etc/ssh/sshd_config is enough for this requirement:
Match Host unit1-priv0
PermitRootLogin yes
Match Host unit0-priv0
PermitRootLogin yes
Use public/private key.
It is described for many times in internet so I don't think it is userful to repeate it in detail again.
A briefly summary what to do:
ssh-keygen)ssh-copy-id root@your_server)Now only these two clients and the users of the commands above have root access to the server and additionally no password is required anymore.
Maybe this is an good entry point to start over (steps #1 and #2)