I'm currently trying to set up an SSH server so that access to it from outside the network is ONLY allowed using an SSH Key and does not allow access to root or by any other username/password combination.
At the same time, internal users inside the network, still need to be able to connect to the same system, but expect to log in in the more traditional sense with a user name and password.
Users both external & internal will be accessing the system from windows using PuttySSH and the external access will be coming into the system via a port forwarding firewall that will open the source port to the outside world on some arbitrarily chosen high numbered port like 55000 (or what ever the admins decide)
The following diagram attempts to show the traffic flows better.
I know how to set up the actual login to only use keys, and I know how to deny root, what I don't know is how to separate the two login types.
I had considered running two copies of SSHD listening on different ports on the same IP and having two different configurations for each port.
I also considered setting up a "match" rule, but I'm not sure if I can segregate server wide configurations using those options.
Finally, the external person logging in will always be the same user let's call them "Frank" for the purposes of this question, so "Frank" will only ever be allowed to log in from the external IP, and never actually be sat in front of any system connecting internally, where as every other user of the system will only ever connect internally, and never connect from an external IP.
Franks IP that he connects from is a dynamically assigned one but the public IP he is connecting too is static and will never change, the internal IP of the port forwarder like wise will also never change and neither will the internal IP address of the SSH server.
Internal clients will always connect from an IP in the private network range that the internal SSH servers IP is part of and is a 16 bit mask EG: 192.168.0.0/16
Is this set up possible, using one config file and one SSH server instance? If so, how do I do it?
Am I much better using 2 running servers with different config?
For ref the SSH server is running on Ubuntu 18.04.