Lightsail Instance SSH Connection not build into Mac terminal : Error ssh: connect to host (Ip address) port 22: Operation timed out

1

0 Hi 👋 Folks,

I am using Macbook M2 Pro Terminal to get connect with my light sail instance, unfortunately, it gives an error on terminal which is underfollowing

ssh: connect to host (Lightsail instance Ip port 22): Operation timed out

However, I have provided all details including proper parameters as defined by Amazon Articles with absolute path like ssh -i /Users/amirali/Desktop/SecurityKeysFile/xyz.pem root@IPaddress

that's how I give path as per file is save in above location. On other hand, I have follow the this Amazon article https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-ssh-using-terminal#terminal-ssh-change-key-file-permissions

Unfortunately, it's been more than 2 days unable to resolve, get stuck therefore, my all work is In complete

However, I am familiar with Linux therefore, I just need small assistance to get this work done.

What I have found through systemctl status sshd

https://paste.pics/f22db5717fb96c4d60b59d57a1efe8ec

looking forward to hearing from seniors

Thanks Amir Ali


I have checked with your above given method screenshot is attached, yes the port is filtered still I'm unable to get connect with Lightsail instance kindly provide complete solutions thnaks Amir Ali

=======================================

2 Respuestas
0
Respuesta aceptada

If configured, you can use the EC2 Serial Console for Linux to troubleshoot OS-level issues on supported Nitro-based instance types. This allows troubleshooting of boot issues, network configuration, and SSH configuration issues. Before using the serial console, grant access to it at the account level and create AWS Identity and Access Management (IAM) policies granting access to your IAM users. After configuration, connect to the EC2 instance through the EC2 serial console using a password-configured Linux user. Then run commands to verify that the SSH connections aren't being blocked by the OS firewall or TCP wrapper, and that the sshd service is running and listening on port 22​

https://repost.aws/knowledge-center/ec2-linux-resolve-ssh-connection-errors

profile picture
EXPERTO
respondido hace un año
profile picture
EXPERTO
revisado hace un mes
  • Hi sedat_salman,

    I am not using the EC2 instance, I'm referring this issue from Lightsail Instance to Mac terminal ssh connection.

    Kindly provide concise resolution, it's very long process you have mentioned

    thanks

  • User is not asking for EC2 instance, this issue is specific to Lightsail instance

0

I was wondering how Lightsail's firewall is configured since it is an SSH timeout error.
Please check if port 22 and the IP address of the connection source are allowed in this setting.
https://lightsail.aws.amazon.com/ls/docs/en_us/articles/understanding-firewall-and-port-mappings-in-amazon-lightsail

profile picture
EXPERTO
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas