Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm having some difficulties at the moment with my Ubuntu SSH server. The only title I could come up with summarizing my situation was too long so here is my problem:

I recently discovered the firewall "ufw" command on Ubuntu, now I am trying to configure so that when I use putty to connection via SSH to my Ubuntu OS, that I could only use a very specific port number and not the default port "22".

For some reason, I am being refused access on my newly chosen port. Since I'm still new to Ubuntu and networking, I don't quite understand what's wrong, any advice?

share|improve this question

closed as too localized by Oli Aug 23 '12 at 10:12

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
I'm closing this because you resolved this yourself by noticing you made a couple of mistakes (as you pointed out in your comment below). –  Oli Aug 23 '12 at 10:13

1 Answer 1

I gues you've haven't allowed the SSH port in your nfw configuration. In case you didn't did this, the port where SSH is running is blocked by the firewall. I gues you can't have remote access to your server...

If you have (fysical) access to your server you can open the SSH port using following command:

nfw allow <port number>

share|improve this answer
    
No, I've already allowed my specific port number with the command you suggested. And I've also changed the port number in the file "/etc/ssh/ssh_config" –  Armedan Aug 12 '12 at 18:41
    
Nevermind, but thanks for the reply. I've gone through everything again and here are the mistakes made: 1-I should have changed the port numbers in "/etc/ssh/sshd_config" and not in "/etc/ssh/ssh_config". 2-I did not restart the ssh server(i.e. sudo /etc/init.d/ssh restart) –  Armedan Aug 12 '12 at 20:09

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