AWS EC2: ssh: connect to host 10.0.0.206 porta 22: Connessione scaduta

0

Domanda

OS: Ubuntu

IP pubblico da cui cerco ssh: 153.5.57.2

La regola di sicurezza:

In entrata:

Name
    Security group rule ID
    IP version
    Type
    Protocol
    Port range
    Source
    Description
    –   sgr-01a63df5e26bc8e9a   IPv4    HTTP    TCP 80  0.0.0.0/0   –
    –   sgr-0cafa26a9ca34ccbe   IPv4    SSH TCP 22  153.5.57.2/32   –
    –   sgr-047038a9c030dd52b   IPv4    HTTPS   TCP 443 0.0.0.0/0   –

In uscita:

Name
    Security group rule ID
    IP version
    Type
    Protocol
    Port range
    Destination
    Description
    –   sgr-0812dc9c3b21745e1   IPv4    All traffic All All 0.0.0.0/0   –

Regola ACL: (in Entrata e in Uscita)

Rule number
    Type
    Protocol
    Port range
    Source
    Allow/Deny

22  SSH (22)    TCP (6) 22  153.5.57.2/32 Allow

100 All traffic All All 0.0.0.0/0 Allow

\*  All traffic All All 0.0.0.0/0 Deny

Tabella di Route:

Destination
    Target
    Status
    Propagated

10.0.0.0/24 local Active    No

Internet Gateway è collegato al mio VPC.

Subnet è collegato al mio VPC.

Tabella di Route è associato con subnet.

Regola ACL è associato con subnet.

ssh -vvv -i "my-private-key.pem" [email protected]
OpenSSH_8.2p1 Ubuntu-4ubuntu0.2, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname 10.0.0.206 is address
debug2: ssh_connect_direct
debug1: Connecting to 10.0.0.206 [10.0.0.206] port 22.
debug1: connect to address 10.0.0.206 port 22: Connection timed out
ssh: connect to host 10.0.0.206 port 22: Connection timed out
amazon-ec2 amazon-web-services ssh
2021-11-23 10:41:22
1

Migliore risposta

1

Il gruppo di protezione che permette l'accesso da:

SSH TCP 22  153.5.57.2/32

Pertanto, sembra che si desidera connettersi da un computer su Internet la istanza di Amazon EC2.

Tuttavia, il comando si utilizza per la connessione è:

ssh -vvv -i "my-private-key.pem" [email protected]

L'indirizzo IP di 10.0.0.206 è un indirizzo IP privato che è raggiungibile solo all'interno del VPC. Si non accessibile da Internet.

Per accedere all'istanza EC2 da Internet:

  • Istanza richiede un indirizzo IP Pubblico
  • L'istanza deve essere in Public Subnet (definito come una subnet che ha una voce di Tabella di Route per un Gateway Internet)
  • È necessario specificare l'indirizzo IP pubblico quando la connessione all'istanza
2021-11-23 21:20:07

In altre lingue

Questa pagina è in altre lingue

Русский
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................