Answer the question
In order to leave comments, you need to log in
How to restrict ssh access to specific users?
Hello! There is a server on debian 9 with two network cards (for the local network and for the Internet).
From the local network, everyone should have access via ssh. But 1-2 certain users should be able to connect via the Internet, and close access for the rest.
How to organize this? Regular means of ssh, as I understand it, can not be done.
Answer the question
In order to leave comments, you need to log in
Raise two separate sshds, pointing them to different configuration files
/usr/sbin/sshd -f /etc/ssh/sshd_config_local
/usr/sbin/sshd -f /etc/ssh/sshd_config_external
Write the interface in ListenAddress in each config - you can do both sshd run on the same port 22, and no one will suspect anything.
And there, through AllowUsers, specify who on which sshd is allowed to enter.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question