Ubuntu – Restrict SSH Access to Specific IP for User


My /etc/ssh/sshd_config file has a line like:

AllowUsers jim@

If I want to allow jim to use another IP addresses, how do I specify it?

Does it take the form of a comma separated list? Or, do add a similar line like

AllowUsers jim@new-ip-address


Best Answer

  • I would do

    AllowUsers jim@ jim@


    AllowUsers jim@11.22.33.*

    should work, that is if you are internal and he has a dynamic ip.

  • Related Question