Changing SSH port in sshd config file causes Putty and Filezilla not to function

September 7, 2014 2.4k views
ralper3
By:
ralper3

I've been successfully communicating with my droplet using encypted keys for some time. In order to improve security I changed the ssh port from the standard 22 to a different port number. Now I can't access my droplet via Putty or Filezilla.
I did a restart of sshd and I modified Putty by changing the port there as well.( Filezilla says it gets the port from the server). Any idea what may be wrong ?
ralper3

1 Answer

sounds like a firewall issue.

try running:

iptables -L

and drop it here, to be sure of that, you con log in using the digital ocean control panel, and inside of your box, just try "ssh localhost -p <PORT>" if it connects, it surely is a firewall issue.

  • @jsanchez
    Hi, thanks for the reply. I suspected it was a firewall problem. However, I have Fail2Ban installed and that program seems to take over the firewall. The command iptables -L shows no port numbers, only names ie. ssh.,smpt etc.
    I ran the command you suggested in the DO Console. What it did was to permanently add <PORT> (RSA) to the list of known hosts. I then tried to log in again with Putty and failed via connection timeout.
    I may have to dig around in Fail2Ban config files for some clues.

    ralper3

Have another answer? Share your knowledge.