2

I am changing over to a hosted server and I want to use non-standard ports for SSH. Is this possible? Wouldn't I have to have access to the router, in order to forward ports?

1 Answer 1

2

It depends on the provider's setup. Maybe the support staff can configure the router for you upon request; in any case you'll have to configure the ssh server as well.

ssh server port is usually configured in /etc/ssh/sshd_config (man sshd_config(5)) using the "Port" directive, as follows:

Port 22

Should you need to test if additional or different ports are allowed by your provider's firewall, you can have the server listening to multiple ports just by using multiple "Port" directives.

Do not forget to reload your sshd server after editing the file.

1
  • As an added note - make SURE you talk to the vendor or you could find yourself locked out of your server right quick... Dec 18, 2011 at 1:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .