EC2-chmod:无法访问‘mypemfile.pem’:没有这样的文件或目录

问题描述 投票:0回答:2

我在启动pem实例时下载了t2.small文件。当我尝试通过ssh连接它时,请说目录中没有这样的文件。但请确保该pem文件位于目录中。

    $ ls
      mypemfile.pem
    $ chmod 400 mypemfile.pem
      chmod: cannot access ‘mypemfile.pem’: No such file or directory
    $ ssh -i "mypemfile.pem" [email protected]
      Warning: Identity file mypemfile.pem not accessible: No such file or directory.
      Permission denied (publickey).

如何跟踪此问题?和任何解决方案?

注意:我从另一个帐户共享的AMI映像创建了实例。

amazon-web-services ssh amazon-ec2 chmod
2个回答
0
投票

确定问题是因为没有“ mypemfile.pem”文件。

重新检查文件的可用性,如果文件可用,请重命名文件或对其进行复制,然后尝试使用新创建的文件。

希望有帮助。.>


0
投票

我在Mac上发现了。所以,这就是我要做的。当您创建私钥时,我的Mac保存为any.pem.txt,因此,要连接到AWS实例,只需在.AWS指令要求您执行的操作中添加.txt扩展名。例如:

© www.soinside.com 2019 - 2024. All rights reserved.