1

I want to run my sshd server on multiple ports but different domains.

The server should be reachable as following:

ssh -p 12345     example.com
ssh -p 22    git.example.com

I tried to modify /etc/ssh/sshd_config like this:

Port 12345
ListenAddress 0.0.0.0
ListenAddress git.example.com

But that's not working.

fechnert
  • 133

1 Answers1

1

https://superuser.com/questions/597660/sshd-service-listening-on-multiple-ports

You could also do something with iptables to shuffle the ports around.

ssh does not care so much about domains. It just listens on an ip:port combination. Its up to you to make the domains point at the right ip.