Putty EC2连接问题 [英] Issue with Putty EC2 connection

查看:55
本文介绍了Putty EC2连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是EC2的新手,但出现此错误:

I am new to EC2 and I am getting this error:

Using username "ec2-user"
Server refused our key 
Disconnected: No supported authentication methods available (server sent: publickey)

我正在使用 Amazon Linux AMI 2017.03.1(HVM),SSD卷类型,因此我的用户名正确.我还已经将pem文件转换为ppk文件,并在腻子控制台中将其添加到SSH-Auth中.

I am using Amazon Linux AMI 2017.03.1 (HVM), SSD Volume Type so my username is correct. I have also converted the pem file into ppk file and added into SSH-Auth in putty console.

我已经针对我的问题查看了StackOverflow中的所有解决方案,但是似乎都没有用.

I have looked at all the solutions in StackOverflow for my problem but none seem to work.

在我的VPC仪表板中->网络ACL->入站规则

In my VPC dashboard -> Network ACLs -> Inbound Rules

Rule # Type         Protocol   Port Range   Source    Allow / Deny
100    ALL Traffic   ALL       ALL     0.0.0.0/0      ALLOW
*      ALL Traffic   ALL       ALL     0.0.0.0/0      DENY

这可能是导致错误的原因吗?

Could this be a reason for the error?

推荐答案

网络访问控制列表(NACL)没问题.只需将其保留为默认设置即可.您正在连接到服务器(即使服务器拒绝连接)的事实证明您的计算机与Amazon EC2实例之间存在连接.

The Network Access Control List (NACL) is not a problem. Just leave it at the default setting. The fact that you are connecting to the server (even though it is refusing the connection) is proof that there is connectivity between your computer and the Amazon EC2 instance.

问题出在认证上.基本上是说它不喜欢您的密钥对.

The problem lies in authentication. It is basically saying that it doesn't like your key pair.

  • 确保您转换的PEM文件的名称与与实例关联的密钥对相同(如管理控制台中所示)
  • 尝试再次转换密钥-可能格式不正确
  • Make sure the PEM file that you converted has the same name as the Key Pair associated with the instance (as shown in the management console)
  • Try converting the key again -- it might not be in the right format

请参阅::

See: Use PuTTY to access EC2 Linux Instances via SSH from Windows (You don't need to use Pageant.)

这篇关于Putty EC2连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆