Amazon ec2 AWS EC2:连接超时-SSH
无法通过SSH连接到我的Amazon Linux AMI,但是我可以使用相同的VPC、安全组和密钥连接到其他实例。 这些是系统日志,非常感谢您的帮助。 http…' 正在启动cloudinit:cloudinitv。0.7.6在2021年5月21日星期五13:36:30+0000运行“模块:配置”。上升7.43秒。 正在启动sshd:[确定]Amazon ec2 AWS EC2:连接超时-SSH,amazon-ec2,ssh,connection-timeout,amazon-ebs,amazon-linux,Amazon Ec2,Ssh,Connection Timeout,Amazon Ebs,Amazon Linux,无法通过SSH连接到我的Amazon Linux AMI,但是我可以使用相同的VPC、安全组和密钥连接到其他实例。 这些是系统日志,非常感谢您的帮助。 http…' 正在启动cloudinit:cloudinitv。0.7.6在2021年5月21日星期五13:36:30+0000运行“模块:配置”。上升7.43秒。 正在启动sshd:[确定] Starting ntpd: [ OK ] Starting sendmail: [ OK ] Starting sm-client: [
Starting ntpd: [ OK ]
Starting sendmail: [ OK ]
Starting sm-client: [ OK ]
Starting httpd: [ OK ]
Starting mongod: [ OK ]
我的问题解决了。请按照下面的帖子检查所遵循的程序。希望它也能帮助其他人
您试图访问的EC2实例是否在公共子网中?请使用
ssh-vvv EC2-user@IP
并向我们展示调试日志显示的内容。@JackMarchetti是的,此外,我能够连接到同一子网中的所有其他ec2实例。@JohnRotenstein无法附加完整的日志,但这里有一些调试日志。chitti@Chitranjans-MacBook Air下载%ssh-vvv ec2-user@ec2-3-7-73-34.ap-south-1.compute.amazonaws.com OpenSSH_8.1p1,LibreSSL 2.7.3 debug1:读取配置数据/etc/ssh/ssh_config debug1:/etc/ssh/ssh_config第47行:应用*debug1的选项:连接到ec2-3-7-73-34.ap-south-1.compute.amazonaws.com端口22。debug1:已建立连接。感谢您的帮助@JohnRotenstein问题已解决,请在下面查找解决方案。
Setting hostname localhost.localdomain: [ OK ]
Setting up Logical Volume Management: [ 3.718097] random: lvm: uninitialized urandom read (4 bytes read)
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
[ OK ]
Checking filesystems
Checking all file systems.
[ OK ]
Remounting root filesystem in read-write mode: [ 3.759745] EXT4-fs (xvda1): re-mounted. Opts: (null)
[ OK ]
Mounting local filesystems: [ OK ]
Enabling local filesystem quotas: [ OK ]
[ 3.791456] random: dd: uninitialized urandom read (4096 bytes read)
Enabling /etc/fstab swaps: [ OK ]
Entering non-interactive startup
Starting LVM metadata daemon: [ OK ]
Starting LVM poll daemon: [ OK ]
[ 3.924597] random: vgs: uninitialized urandom read (4 bytes read)
[ 4.010580] NET: Registered protocol family 10
[ 4.018195] Segment Routing with IPv6
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
Determining IP information for eth0... done.
Determining IPv6 information for eth0... done.
[ OK ]
Starting auditd: [ OK ]
Starting system logger: [ OK ]
Starting irqbalance: [ OK ]
Starting rngd: [ 5.871299] urandom_read: 1 callbacks suppressed
[ 5.871300] random: rngd: uninitialized urandom read (16 bytes read)
Unable to open file: /dev/hwrng
[ OK ]
[ 5.910283] random: crng init done
Starting rpcbind: [ OK ]
Starting NFS statd: [ OK ]
Starting system message bus: [ OK ]
Mounting filesystems: [ OK ]
Starting acpi daemon: [ OK ]
Retrigger failed udev events--type=failed is deprecated and will be removed from a future udev release.
[ OK ]
Starting cloud-init: Cloud-init v. 0.7.6 running 'init-local' at Fri, 21 May 2021 13:36:29 +0000. Up 6.53 seconds.
Starting cloud-init: Cloud-init v. 0.7.6 running 'init' at Fri, 21 May 2021 13:36:29 +0000. Up 6.73 seconds.
ci-info: +++++++++++++++++++++++Net device info++++++++++++++++++++++++
ci-info: Device Up Address Mask Hw-Address
ci-info: lo True 127.0.0.1 255.0.0.0 .
ci-info: eth0 True 172.31.10.11 255.255.240.0 0a:3b:55:e4:8b:7e
ci-info: ++++++++++++++++++++++++++++++Route info+++++++++++++++++++++++++++++++
ci-info: Route Destination Gateway Genmask Interface Flags
ci-info: 0 0.0.0.0 172.31.0.1 0.0.0.0 eth0 UG
ci-info: 1 169.254.169.254 0.0.0.0 255.255.255.255 eth0 UH
ci-info: 2 172.31.0.0 0.0.0.0 255.255.240.0 eth0 U
May 21 13:36:29 cloud-init[2433]: __init__.py[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: 'sudo yum install -y
Starting ntpd: [ OK ]
Starting sendmail: [ OK ]
Starting sm-client: [ OK ]
Starting httpd: [ OK ]
Starting mongod: [ OK ]