I am playing with Linux and have setup ssh on my ubuntu box. When I had the default listening port set to 22, I was able to connect with PUTTY on my Windows 7 box. However, once I changed the listening port from 22 to 443, I am unable to connect from my windows machine.
In /etc/ssh/sshd_config
#Port 22
Port 443
I had Apache2 running and thought that could have been the issue. There was a default-ssl file in the /etc/apache2/sites-available/ folder. However, I stopped Apache and attempted to connect in Windows with no luck.
I went ahead and changed the Port to 52101 and that port number works.
I’m thinking that there is something else listening on 443.
When doing netstat -lnptu I get
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN –
tcp6 0 0 :::443 :::* LISTEN –
I did the netstat after I had changed ssh listening port to 22.
Does anyone have any thoughts as to why this is not working?
Well, if you have the default setting for logging (check what is set under logging in sshd_config), you should be able to find any error messages from sshd in /var/log/auth. That will tell you what is going wrong from sshd’s perspective. The most likely is that some other process is listening on the port (which seems to be the case from your netstat). Try
to see what process is doing that.