Is this possible with OpenSSH?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I want to setup a server so that root logins are allowed but only from
certain hosts and non-root logins are allowed to come from anywhere.
Is this possible to do? It seems like if you use "AllowUsers
root@host", the normal user accounts are automatically denied
logins and I'd rather not list them all in sshd_config.


Re: Is this possible with OpenSSH?

If you allow root logins only via publickey, then you can restrict them in
~root/.ssh/authorized_keys with the "from=..." option on the keys.

  Richard Silverman

Re: Is this possible with OpenSSH?

Quoted text here. Click to load it

One way is to allow root logins only on an alternative port, and restrict
the permitted hosts for that alternative daemon or port via SSH
configuration or via firewall configuration.

Site Timeline