简体   繁体   English

NetBeans中SFTP的私钥文件

[英]Private Key File for SFTP in NetBeans

I'm trying to configure Netbeans for automatically upload PHP files to an SFTP server (I have not admin permissions in that server). 我正在尝试配置Netbeans以自动将PHP文件上传到SFTP服务器(我在该服务器中没有管理员权限)。

Everything is OK, except that Netbeans launches a warning each time it needs to upload something: 一切都很好,除了Netbeans每次需要上传内容时都会发出警告:

The authenticity of host ... can't be established. 主机的真实性......无法建立。 RSA key fingerprint is XX:XX:XX:,,,, Are you sure you want to continue connecting? RSA密钥指纹是XX:XX:XX:,,,,您确定要继续连接吗?

How can avoid being prompted every time? 如何避免每次都被提示? I suppose specifying the private key file is enough but don't know how to generate that file. 我想指定私钥文件就足够但不知道如何生成该文件。 Can you help me? 你能帮助我吗? (Suppressing the warning by other way will be ok too.) (通过其他方式抑制警告也可以。)

This is not too easy to understand from the gui, but it really is quite simple. 这从gui中不太容易理解,但它确实非常简单。

First, you need to create an empty text file that Netbeans will write to, call it knownhosts.txt . 首先,您需要创建一个Netbeans将写入的空文本文件,称之为knownhosts.txt

Point to this file in the Known Hosts File field in your configuration. 在配置的“ 已知主机文件”字段中指向此文件。 (Right-click on your project in the Projects window, choose Properties from the pull-down menu; select Run Configuration in the Project Properties dialog; and then click Manage Connections... Now you should see the Known Hosts File field where you can Browse to your empty text file.) 在项目属性对话框中选择运行配置 ;(在Projects窗口的项目上单击右键,从下拉菜单中选择属性 ,然后单击管理连接...现在你应该看到已知主机文件栏可以浏览到您的空文本文件。)

Test the connection. 测试连接。

That's it! 而已!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM