在JavaSpring启动应用程序中使用public键指纹来解决"The authenticity of host 'xxxx' can't be established"
Use public key fingerprint in Java Spring Boot application to solve "The authenticity of host 'xxxx' can't be established"
我有一个 Java Spring 引导应用程序,它使用 spring-integration-sftp 依赖项连接到 SFTP 服务器.我得到一个错误
The authenticity of host 'xxxx' can't be established
我知道这可以通过设置 sftpSessionFactory.setAllowUnknownKeys(true)
轻松消除,但这不是一个好的做法,我宁愿不这样做。
我有以下 SFTP 服务器的 public 密钥指纹。我如何使用它来安全地连接到我的 SFTP 服务器,以便知道我的主机?我应该在 sftpSessionFactory
中另外设置什么?
SHA256: uqe0Rt6BqvK65bFnihm1SyG9mlw8ZOsvyI+LxzLqiso &
MD5: 40:cc:1f:9f:91:e9:47:a3:d8:fc:0b:72:a4:3d:55:78
使用 DefaultSftpSessionFactory.setKnownHosts
提供带有服务器主机密钥的 known_hosts
类文件的路径。
spring-integration-sftp 在后台使用 JSch,因此有关更多详细信息,请参阅:
我有一个 Java Spring 引导应用程序,它使用 spring-integration-sftp 依赖项连接到 SFTP 服务器.我得到一个错误
The authenticity of host 'xxxx' can't be established
我知道这可以通过设置 sftpSessionFactory.setAllowUnknownKeys(true)
轻松消除,但这不是一个好的做法,我宁愿不这样做。
我有以下 SFTP 服务器的 public 密钥指纹。我如何使用它来安全地连接到我的 SFTP 服务器,以便知道我的主机?我应该在 sftpSessionFactory
中另外设置什么?
SHA256: uqe0Rt6BqvK65bFnihm1SyG9mlw8ZOsvyI+LxzLqiso &
MD5: 40:cc:1f:9f:91:e9:47:a3:d8:fc:0b:72:a4:3d:55:78
使用 DefaultSftpSessionFactory.setKnownHosts
提供带有服务器主机密钥的 known_hosts
类文件的路径。
spring-integration-sftp 在后台使用 JSch,因此有关更多详细信息,请参阅: