2021年2月4日星期四

How to access EC2 instance via SSH on mac with Operation Timed Out?

I am trying to connect to an EC2 machine with the following command line on my terminal:

ssh -i id_rsa_aws <ec2_ip_address> -l ec2-user -vvv

Here is the result:

debug1: Reading configuration data /etc/ssh/ssh_config  debug1: /etc/ssh/ssh_config line 48: Applying options for *  debug2: resolve_canonicalize: hostname <ec2_ip_address> is address  debug2: ssh_connect_direct  debug1: Connecting to <ec2_ip_address> [<ec2_ip_address>] port 22.  debug1: Connection established.  debug1: identity file id_rsa_aws type 0  debug1: identity file id_rsa_aws-cert type -1  debug1: Local version string SSH-2.0-OpenSSH_7.8  ssh_exchange_identification: read: Operation timed out  

My ssh_config file:

  Host *          SendEnv LANG LC_*  

I know the problem must come from my computer. I have tried using the .pem file and I am getting the same error.

Any help would be appreciated.

Thank you

https://stackoverflow.com/questions/66049715/how-to-access-ec2-instance-via-ssh-on-mac-with-operation-timed-out February 05, 2021 at 12:26AM

没有评论:

发表评论