First of all, I'm pretty new to SSH. I've used it before, but never had to deal much with setting it up or navigating the details. Migrated from ServerFault.
Whenever I try to ssh to a public ip address from my windows 10 computer, I get an error that looks like ssh: connect to username@<public ip address> port 22: Connection timed out.
I can connect to my own linux machine from windows with a private ip address, and my windows machine connects to github with ssh public/private key authentication. My linux machine can connect to external servers (like AWS) via ssh, it's just my windows machine, and just public IP addresses, so far as I can tell.
Here's the output with the -vv option, and on a different port:
ssh -vv -p 2200 example.com OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5 debug2: resolving "example.com" port 2200 debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to example.com [93.184.216.34] port 2200. debug1: connect to address 93.184.216.34 port 2200: Connection timed out ssh: connect to host example.com port 2200: Connection timed out
What is causing this problem, and what do I need to do to fix it, so that I can ssh to external servers from my windows 10 computer?
I can ping external servers fine:
Pinging 1.1.1.1 with 32 bytes of data:
Reply from 1.1.1.1: bytes=32 time=23ms TTL=54
Reply from 1.1.1.1: bytes=32 time=74ms TTL=54
Reply from 1.1.1.1: bytes=32 time=26ms TTL=54
Reply from 1.1.1.1: bytes=32 time=24ms TTL=54
Ping statistics for 1.1.1.1:
packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 23ms, Maximum = 74ms, Average = 36ms
sudo ufw allow 22.22. Many servers move ssh to a high port to cut down on the number of unauthorized login attempts they receive. Can you connect to that same site on port 22 from your Linux box? A timeout means either the remote ssh server isn't running -or- it is running on a different port. You can add-vvas the option to increase the amount of debug info you get on the connection