可以通过Ubuntu上的VSCODE SFTP扩展22.04 OS连接到AWS EC2服务器
我曾经连接Linode和GCP提供的远程服务器,并通过SFTP扩展使用Visual Studio代码,所有这些都可以正常工作。但是,使用相同的配置,我无法连接到我的AWS EC2服务器。 以下是sftp.json(更改敏感信息)
奇怪的是,我可以SSH连接到终端上的服务器,并且可以使用Filezilla发送具有相同凭据的文件。但是我无法通过Visual Studio Code SFTP或SSH远程扩展连接到它。
I used to connect remote servers provided by Linode and GCP and I use Visual Studio Code via Sftp extension and all works just fine. However, with the same set of configurations, I couldn't connect to my Aws EC2 server.
The following is the sftp.json (with sensitive information changed)
And the aws security setting is as following
The strange thing is that I can ssh connect to the server on the terminal and I can use filezilla to send file with the same credential as well. But somehow I can't connect to it via Visual Studio Code sftp or SSH remote extension.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在互联网上搜索了答案,并找到了一个对我有用的答案。
问题与Ubuntu 22.04默认服务器默认密钥设置有关,而不是VSCODE。
该解决方案将以下内容添加到:
/etc/ssh/sshd_config
:in /etc/etc/etc/sssh/ssh/sshd_config
,然后在服务器上重新启动服务
源答案的内容来自 https://github.com/liximomo/liximomo/vscode-sftp/sftp/ssftp/issues /37 在用户 Windware-ono 的答案下。
I searched the answer on the internet and found an answer that worked for me.
The problem has to do with the Ubuntu 22.04 default server default key setting and not with the VSCode.
The solution is adding the following to:
/etc/ssh/sshd_config
:in /etc/ssh/sshd_config
and then restart the service on the server with the following command
The source of the answer comes from https://github.com/liximomo/vscode-sftp/issues/37 under the user windware-ono's answer.