NetBeans 中每次都会提示 Linux 服务器 RSA 密钥

发布于 2024-12-14 15:43:53 字数 302 浏览 6 评论 0原文

我将磁盘映像克隆到另一台服务器,以便对 gentoo 和 nginx 使用相同的设置。现在,每次我通过 sftp 从我的开发 api (NetBeans) 连接到新服务器时,它都会将 rsa 密钥添加到主机文件中。每次将文件保存到服务器时,我都必须单击“是”。

我重新生成了密钥,因为我认为这可能是因为 ip 更改或其他原因,但仍然是同样的问题。我缺少一些 ssh 配置吗?

Putty 似乎正确存储了密钥,因为它警告我密钥已更改,并且缓存中只有一个条目,但我的 sftp 客户端似乎没有意识到密钥已经在主机文件中,因此它询问并每次都会重新添加。让我发疯。

I cloned a disk image to another server to use the same setup with gentoo and nginx. Now every time I connect to the new server from my development api (NetBeans) via sftp, it adds the rsa key to the hosts file. I have to click 'yes' every time I save a file up to the server.

I regenerated the keys because I thought it might be because of the ip change or something, but still the same problem. Is there some ssh configuration I'm missing?

Putty seems to store the keys properly though, as it warned me that the keys had changed and there's only one entry in the cache, but my sftp client doesn't seem to realize that the key is already in the hosts file so it asks and adds it again every time. Driving me crazy.

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

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

发布评论

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

评论(1

面如桃花 2024-12-21 15:43:59

我在 Netbeans 中也遇到了同样的问题,当我将 SFTP 配置(项目的远程服务器设置)中的“已知主机”字段指向 PC 中的空 .txt 文件时,问题得到了解决。该文件可以有任何名称。

I also had the same issue in Netbeans, The problem was solved when I pointed the "known hosts" field in the SFTP configuration (remote server settings for the project) to an empty .txt file in my PC. That file can have any name.

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