Not able to telnet port 22 from local my local machine even though its enabled in networking

0

I am not able to access port 22 from local machine (mac os), even though I have enabled port 22 in networking tab of my amazon lightsail instance. Port 22 is being used by SSH in this instance and I am able to telnet and do ssh from Lightsail web console, but the same cannot be done from my local machine. Enter image description here

Enter image description here

Enter image description here

I have enabled port 22 in firewall-cmd as well, but somehow port 22 is not accessible from outside, however I am able to access other ports!

Akhil
asked 5 months ago295 views
1 Answer
1
Accepted Answer

Hi,

Are you able to SSH from your local to any other remote server e.g. any other Lightsail instance ? (to rule out any outbound issues at your local network side)

Also could you try the ssh command with -vvv option which will show debug output and may help you see where or why the SSH attempt is getting stuck/failing.

Thanks.

profile pictureAWS
EXPERT
AWS-SUM
answered 5 months ago
  • Here is the verbose output for ssh

    I553@M .ssh % ssh -vvv centos@<my-public-ip> OpenSSH_9.4p1, LibreSSL 3.3.6 debug1: Reading configuration data /Users/I553275/.ssh/config debug1: /Users/I553275/.ssh/config line 1: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files debug1: /etc/ssh/ssh_config line 54: Applying options for * debug2: resolve_canonicalize: hostname <my-public-ip> is address debug3: expanded UserKnownHostsFile '/.ssh/known_hosts' -> '/Users/I553275/.ssh/known_hosts' debug3: expanded UserKnownHostsFile '/.ssh/known_hosts2' -> '/Users/I553275/.ssh/known_hosts2' debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling debug3: ssh_connect_direct: entering debug1: Connecting to <my-public-ip> [<my-public-ip>] port 22. debug3: set_sock_tos: set socket 3 IP_TOS 0x48

    (I have masked ip-address with <my-public-ip> for security reasons)

    Just now I created a new Lightsail ubuntu instance and tried to connect to it over SSH, it has the same issue.

  • Looks like my ISP or my network is blocking outbound requests to port 22. I am able to connect SSH from my PC, if I am connected to a mobile hotspot.

    Thank you so much!

  • No problem! Glad we got it figured out :)

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions