Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
As an added note - make SURE you talk to the vendor or you could find yourself locked out of your server right quick... –  Driftpeasant Dec 18 '11 at 1:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.