16

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

AllowUsers jim@11.22.33.456

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

?

heemayl
  • 91,753
  • 1
    The manapage is pretty clear on this: "This keyword can be followed by a list of user name patterns, separated by spaces." – Celada Mar 02 '13 at 01:22

1 Answers1

23

I would do

AllowUsers jim@11.22.33.56 jim@141.212.133.36

OR

AllowUsers jim@11.22.33.*

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

wlraider70
  • 1,683
  • I have similar Error. I want root to login to any IP, I want user1 to login from specific ip for example 1.2.3.4 and I want all other users to login from any IP. How do I do this? – Adarsh Sojitra Jun 29 '17 at 05:37
  • 1
    @AdarshSojitra you don't want a remote access for the user root. – funky-future Aug 09 '17 at 12:22