首页 > 解决方案 > aws amazon linux gui使用vnc错误(EC2)

问题描述

对 AWS 来说非常新,如果是一个愚蠢的 Q,请见谅。

链接参考:https ://aws.amazon.com/premiumsupport/knowledge-center/ec2-linux-2-install-gui/

最后一步说:

"Use the -L parameter to enable port forwarding. Replace PEM_FILE with the path for your private key. Replace INSTANCE_IP with your instance's public or private IP, as appropriate.
ssh -L 5901:localhost:5901 -i PEM_FILE ec2-user@INSTANCE_IP"

所以我把它放在记事本里:

ssh -L 5901:localhost:5901 -i C:\Users\tlech\Documents\aws/AWS.pem ec2-user@[my instance private ip]

我在哪里粘贴这个命令?普通cmd还是腻子?当我在腻子中发布它时出现错误:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

标签: amazon-web-servicesamazon-ec2

解决方案


您必须在 Windows 的 cmd 提示符下运行该命令。或者,您可以安装git bash,它会给您一个 bash 提示符,您也可以在其中运行它。

你的命令会变成

ssh -L 5901:localhost:5901 -i C:\\Users\\tlech\\Documents\\aws\\AWS.pem ec2-user@[instance_public_ip]


推荐阅读