0

I have a server with 4 IP-Adresses assigned.

For example:

111.111.111.111 and 222.222.222.222

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

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.