I would like to SSH into a computer behind a firewall that blocks SSH connections (incoming and outgoing). Amusingly, I can still access the computer using the remote-desktop software TeamViewer. I assumed that TeamViewer is allowed in because it uses a different port than SSH's default port 22, so I added the following ports to /etc/ssh/sshd_config:
Port 22
Port 443
Port 80
Port 5938
Port 10000
and then tried to connect to each of them in turn using (e.g.)
ssh user@remote-computer.com -p 5938
None of the ports work: I still get a Connection timed out
error.
Why can TeamViewer connect to the remote computer while SSH can't? How can I SSH into (or out of) the remote computer?