Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've defined a custom port for SSH within /etc/ssh/ssh_config on my ubuntu-server installation and it is still accepting SSH on port 22 after rebooting the server.

Is there something else I need to do other than....

Host *

PermitRootLogin no

   Port 6685
   Protocol 2,1
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no
share|improve this question
As Zoredache said, that is the file you need to edit but dont forget to restart the ssh service aswell – Prix Aug 18 '10 at 1:01
Thought he had said he rebooted the server? – Bart Silverstrim Aug 18 '10 at 12:24
up vote 12 down vote accepted

The configuration you are looking for is /etc/ssh/sshd_config. The ssh_config file is for the ssh client.

share|improve this answer

Your Answer


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.