gpt4 book ai didi

ssh - 无法使用VSCode访问EC2实例

转载 作者:行者123 更新时间:2023-12-02 14:17:22 28 4
gpt4 key购买 nike

我创建了一个Ubuntu(18.04)EC2实例。使用bash ssh,我可以毫无问题地登录。但是,当我尝试相同的VSCode时,我遇到了问题。

我在.ssh /中的配置文件有一个条目,如:

Host MyBox
HostName IPADDRESS
IdentityFile C:\Users\myname\mykey.pem
User ubuntu

我选择此选项以连接VSCode,但出现一个对话框,提示 Could not establish connection to "MyBox". Connecting was canceled.
输出窗口显示:
[14:03:27.443] > The authenticity of host 'XXX (XXX)' can't be established.
> ECDSA key fingerprint is SHA256:LALALALALA
> Are you sure you want to continue connecting (yes/no)?
[14:03:27.444] Detected fingerprint confirmation message
[14:03:27.444] Showing fingerprint confirmation dialog
[14:03:29.815] Fingerprint dialog canceled
[14:03:29.816] "install" terminal command canceled
[14:03:29.817] Resolver error: Connecting was canceled
[14:03:29.820] TELEMETRY: {"eventName":"resolver","properties":{"outcome":"failure","reason":"Canceled","askedPw":"0","askedPassphrase":"0","asked2fa":"0","askedHostKey":"1","gotUnrecognizedPrompt":"0","remoteInConfigFile":"1"},"measures":{"resolveAttempts":1,"retries":1}}
[14:03:29.823] ------

在Windows登录期间,显示 Initializing VS Code Server。我不确定这是否表示已建立连接。

最佳答案

输出显示:

[14:03:27.444] Showing fingerprint confirmation dialog
[14:03:29.815] Fingerprint dialog canceled

我没有注意到“命令面板”区域中的小对话框。我可能打开了太多的Windows。

当我接受指纹后,连接即建立。接受将在known_hosts中添加一个条目。当然,这意味着对话框不会再次弹出。

关于ssh - 无法使用VSCode访问EC2实例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58438472/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com