VS代码远程SSH连接问题

发布于 2025-02-09 11:27:43 字数 397 浏览 2 评论 0原文

我一直在使用VS代码,并通过使用Smartty在公司计算机上的家中远程连接到我们的CentOS系统。但是,由于Smartty没有良好的UI,我认为它已经过时了,因此我想使用VS代码远程SSH而不是Smartty。创建连接时,我遇到了一些问题。我正在分享我的conf。文件

  Host app-ff
    HostName app-ff
    User cayhan
    IdentityFile C:\Users\cayhan\.ssh\id_rsa

我单击“连接到主机当前窗口”,然后向我询问操作系统(Linux,Windows,MacOS),然后问我密码。尽管一切都是正确的,但我无法使用VSCODE访问它,并且获得错误'无法建立连接。权限拒绝'

如何解决此问题

I have been using VS Code and connecting remotely from home on my company computer to our Centos System via using SmarTTy. But I want to use VS code Remote SSH instead of SmarTTy due to the fact that SmarTTy doesn't have a good UI and I think it's obsolete. I faced some problems when I have created connection. I am sharing my conf. file

  Host app-ff
    HostName app-ff
    User cayhan
    IdentityFile C:\Users\cayhan\.ssh\id_rsa

I click 'Connect to Host Current Window' and ask me operating system (linux,windows,macos) and after that ask me password. Although everything is correct I can't access it with VSCode and get error 'Could not establish connection . Permission denied'

How can I solve this problem

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

宛菡 2025-02-16 11:27:43

Windows现在拥有CLI SSH客户端。您可以在VS代码中打开终端并使用

ssh -i ID_RSA用户名@ip

Windows has CLI ssh client now. You can open terminal in VS code and use

ssh -i id_rsa username@IP

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文