SSH via port 443 not responding; others ports OK

August 28, 2015 2.6k views
Control Panels Linux Basics Linux Commands Firewall Configuration Management Networking Security

Hello Digital Ocean comrades,

I greet you as a newbie and, of course, with a basic question relating to challenges I am having getting an SSH connection to connect to port 443 on my Ubuntu droplet.

Let me first set the basics.

Installed and created droplet; followed instructions in excellent tutorials located at

have also reviewed and used portions of

Server is up and running. I was able to custom configure to connect to a specific port (27182) for SSH.

Now, I wish to add Port 443 connection for SSH. I have edited sshd_config to add Port 443 as well as Port 22

ufw has SSH enabled and ports 27182/tcp, 443/tcp and 22/tcp cleared for traffic.

From sshd_config

What ports, IPs and protocols we listen for

Port 27182
Port 443
Port 22

Use these options to restrict which interfaces/protocols sshd will bind to

from ufw

xxxxxxxxxxxxx:~$ sudo ufw status
Status: active

To Action From

27182/tcp ALLOW Anywhere
80/tcp ALLOW Anywhere
443/tcp ALLOW Anywhere
25/tcp ALLOW Anywhere
27182/tcp (v6) ALLOW Anywhere (v6)
80/tcp (v6) ALLOW Anywhere (v6)
443/tcp (v6) ALLOW Anywhere (v6)
25/tcp (v6) ALLOW Anywhere (v6)

all edits to ssh_config were in nano and were saved. ssh was stopped then restarted

ufw has been reloaded.

I CAN telnet and puTTy connect to ports 27128 and to 22. I CANNOT get any sign of life from port 443... nothing.. telnet never responds to it and puTTy spits a connection error when attempting 443 connection from a windoze box; terminal from my mac delivers same results. Can connect to 27182 and 22 from mac OK.

All my web research suggests I should be able to run an SSH connection though port 443... yet I cannot get it to work.

Any ideas on what I should do next to unplug port 443 connection? I am new with unix, so kindly be patient. No doubt this is going to be a very basic configuration error or misunderstanding on my part.


1 comment
  • Sir,

    Thank you for the suggestion. I do not have any processes running on 443 that I am AWARE of ..

    Xxxxxxxxxxxxx:~$ sudo netstat -punta | grep 443
    [sudo] password for xxxxxxx:
    tcp 0 0* LISTEN 1234/sshd

    tcp 0 0 xxxxxxx.64.181:39639 ESTABLISHED 1995/2

    tcp 0 0 xxxxxx.64.181:49453 ESTABLISHED 1995/2

    tcp 0 0 xxxxxxx.64.181:443 ESTABLISHED 1802/sshd: mecarboy
    tcp 0 0 xxxxxx.64.181:37746 ESTABLISHED 1995/2

    tcp 0 0 xxxxxx.64.181:49454 ESTABLISHED 1995/2

    tcp6 0 0 :::443 :::* LISTEN 1234/

    Um, in the realm of incredible dumb, have a started a process without realizing it that is blocking the port?


2 Answers

Hello Mecarboy
Have you got a webserver running, wich could use port 443 default?
You can check your service running port with:

netstat -punta | grep 443

the -p flag will give you the process ID and the process name of whatever is using that port

the -u flag shows udp

the -n flag is for numerical addresses

the -t flag shows tcp

the -a shows listening and non-listening sockets

  • It doesnt look like your webserver is using 443 for https, but to be sure,

    • disable your default ssl virtualhost in apache/nginx
    • Restart apache/nginx and try again. If it doesnt work it could be your firewall, the server firewall or a misconfiguration

Just pick another port for SSH, it is conflicting with your web servers https port (default 443)

Have another answer? Share your knowledge.