我已经能够使用免费套餐连接到Amazon Web Services EC2
并使用它运行R
程序。现在,我尝试将实例与竞价请求一起使用。该实例已创建并正在运行,并且两个状态检查均正常。但是,PuTTY
将无法连接。 PuTTY
仍将使用相同的步骤和相同的key pair
连接到免费实例。
有人可以建议我做错了什么吗?如果此信息可能会有所帮助,则下面是这两个实例的详细信息。我隐藏了Instance IDs
,IPs
,Owner ID
和Reservations
的部分,并提供了虚假的key pair
名称。
这是我无法通过PuTTY
连接的竞价型实例的描述详细信息:
Instance ID: i-XXXXXa30498b1b9ca
Public DNS (IPv4): ec2-XX-XXX-XXX-XXX.us-east-2.compute.amazonaws.com
Instance state: running
IPv4 Public IP: XX.XXX.XXX.XXX
Instance type: r4.xlarge
IPv6 IPs: -
Elastic IPs:
Private DNS: ip-XXX-XX-XX-XX.us-east-2.compute.internal
Availability zone: us-east-2b
Private IPs: XXX.XX.XX.XX
Security groups: default. view inbound rules. view outbound rules
Secondary private IPs
Scheduled events: No scheduled events
VPC ID: vpc-ce0c17a6
AMI ID: ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20191002 (ami-0d5d9d301c853a04a)
Subnet ID: subnet-b3f881c9
Platform: -
Network interfaces: eth0
IAM role: -
Source/dest. Check: True
Key pair name: mykeyb
T2/T3 Unlimited: -
Owner: XXXXXXXXXXXX
EBS-optimized: False
Launch time: November 26, 2019 at 5:43:37 PM UTC-5 (1 hour)
Root device type: ebs
Termination protection: False
Root device: /dev/sda1
Lifecycle: spot
Block devices: /dev/sda1
Monitoring: basic
Elastic Graphics ID: -
Alarm status: None
Elastic Inference accelerator ID: -
Kernel ID: -
Capacity Reservation: -
RAM disk ID: -
Capacity Reservation Settings: Open
Placement group: -
Partition number: -
Virtualization: hvm
Reservation: r-XaecaXXbfXacXXXXX
AMI launch index: 0
Tenancy: default
Host ID: -
Affinity: -
State transition reason: -
State transition reason message: -
Stop - Hibernation behavior: Disabled
Number of vCPUs: 4
以下是我可以使用PuTTY
连接的免费实例的描述详细信息:
Instance ID: i-ZZdZZZZZ41cZZZZZZ
Public DNS (IPv4): ec2-X-XXX-XXX-XX.us-east-2.compute.amazonaws.com
Instance state: running
IPv4 Public IP: X.XXX.XXX.XX
Instance type: t2.micro
IPv6 IPs: -
Elastic IPs:
Private DNS: ip-XXX-XX-XX-XXX.us-east-2.compute.internal
Availability zone: us-east-2b
Private IPs: XXX.XX.XX.XXX
Security groups: launch-wizard-5. view inbound rules. view outbound rules
Secondary private IPs:
Scheduled events: No scheduled events
VPC ID: vpc-ce0c17a6
AMI ID: ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20191002 (ami-0d5d9d301c853a04a)
Subnet ID: subnet-b3f881c9
Platform: -
Network interfaces: eth0
IAM role: -
Source/dest. check: True
Key pair name: mykeyb
T2/T3 Unlimited: Disabled
Owner: XXXXXXXXXXXX
EBS-optimized: False
Launch time: November 22, 2019 at 12:16:56 AM UTC-5 (less than one hour)
Root device type: ebs
Termination protection: False
Root device: /dev/sda1
Lifecycle: normal
Block devices: /dev/sda1
Monitoring: basic
Elastic Graphics ID: -
Alarm status: None
Elastic Inference accelerator ID: -
Kernel ID: -
Capacity Reservation: -
RAM disk ID: -
Capacity Reservation Settings: Open
Placement group: -
Partition number: -
Virtualization: hvm
Reservation: r-XXaXXXdfXXXXfXXXX
AMI launch index: 0
Tenancy: default
Host ID: -
Affinity: -
State transition reason: -
State transition reason message: -
Stop - Hibernation behavior: Disabled
Number of vCPUs: 1
答案 0 :(得分:1)
两个EC2实例上的安全组不同。安全组是防火墙规则集。您需要允许入站端口22(SSH)到竞价型实例。鉴于两个实例都在同一VPC中,您可以执行此操作的一种简单方法是将launch-wizard-5
安全组添加到竞价型实例。或使用等效的入口规则集创建一个新的安全组,并将其添加到竞价型实例中。