3

currently I'm handling 2 server (A and B). In server A I installed Ubuntu 12.10. I changed the SSH port into 1198 and it works fine. In server B it has been installed with Ubuntu 11.04. I tried to change the port number into 1198 as well but it refused the connection when I tried to connect again using Putty.

I change the SSH configuration on /etc/ssh/sshd_config and I did restart the SSH using sudo service ssh restart. I was thinking its because of firewall allowed port but the firewall shows inactive when I run sudo ufw status.

Any idea why this can happened?

3
  • Can you run a portscan against machine B? sudo nmap -sV <host>
    – OrangeTux
    Jan 28, 2014 at 7:51
  • Also, 11.04 no longer receives updates and 12.10 will be EOL come April, so you really should switch to a current Ubuntu version. For servers, I generally recommend 12.04, which is a LTS version and will be updated until April 2017.
    – drc
    Jan 28, 2014 at 9:56
  • Could you add results of sudo netstat -lntp | grep ssh?
    – user.dz
    Jan 28, 2014 at 11:28

3 Answers 3

1

In my case, I needed to run iptables to open up the port:

iptables -I INPUT -p tcp --dport $PORTNUMBER -j ACCEPT
0

For the changes to be applied, you need to restart the service sshd and not necessarily the pc (but you might as well).

you can do that by running

sudo service ssh restart
0

In my case I forgot to set virtual server rule on my router. Don't forget to associate port with host under NAT.

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