简体   繁体   English

权限被拒绝(公钥)-aws接口

[英]permission denied (public key) -aws interface

I'm kind of new to bash programming, but I decided to take an online class in which we create a t1 micro instance through AWS and ssh in and do all of our work there. 我是bash编程的新手,但是我决定参加一个在线课程,我们在其中通过AWS和ssh创建一个t1微型实例,并在那里进行所有工作。 I had been sshing through an alias I had made just fine for about a month, then I took a short hiatus for about two weeks. 我一直在寻找一个别名,这个别名本来可以用一个月左右,但是我中断了大约两个星期。 When I came back I got the permission denied(public access) message. 当我回来时,我收到了权限被拒绝(公共访问)消息。 I have looked at other threads and gone into my .ssh files and compared files and the like. 我查看了其他线程,并进入我的.ssh文件并比较了文件等。 It might have something to do with the fact that I generated new key pairs on the t1 micro instance, but I don't know how to fix it. 这可能与我在t1微型实例上生成新的密钥对有关,但是我不知道如何解决它。 When I debug with ssh -v key.pem I get: 当我使用ssh -v key.pem调试时,我得到:

OpenSSH_5.2p1, OpenSSL 0.9.8x 10 May 2012
debug1: Reading configuration data /Users/myName/.ssh/config
debug1: Reading configuration data /etc/ssh_config
ssh: Could not resolve hostname key.pem: nodename nor servname provided,      
or not known

It's clearly an issue with one of the systems not recognizing the key pair, but I can't resolve it. 这显然是一个系统无法识别密钥对的问题,但我无法解决。 Thanks everyone, all comments welcome. 谢谢大家,欢迎所有评论。

the problem is your ssh command 问题是您的ssh命令

what you want to run is 您要运行的是

ssh -i key.pem [user]@[servername] ssh -i key.pem [用户] @ [服务器名]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM