I have a server with 4 IP-Adresses assigned.

For example: and

now I want to allow User1 to login into ssh on ip but not on IP and to allow user2 to login into ssh on ip but not on IP

I´m looking around now for hours but didn´t find a way to limit a target ip to the user only to limit a user to a host.

I hope you can help me.

Thank you in advance

  • 2
    I think it should be possible using Match LocalAddress xxx.xxx.xxx.xxx blocks in the sshd_config, with appropriate DenyUsers / AllowUsers directives - but I haven't tried it – steeldriver Jan 31 at 23:42

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.