Public key validation fails when SFTP server has multiple different key types #8701
Labels
in: sftp
status: duplicate
There is already an issue similar to this. The link to it should be present
type: bug
In what version(s) of Spring Integration are you seeing this issue?
6.0.6
Describe the bug
When the SFTP server has multiple keys the public key validator not selecting the type described in the known_hosts file,
but asks down a random one from the server and then it loads the known_hosts to compare.
I did not found any option to force a certain public key type gathered from the server.
To Reproduce
See "Describe the bug"
Expected behavior
A) There is some setting to force a certain key type to load from the server
B) Loading the key type from the server described in the known_hosts in case of many different keys.
Sample
To make a sample an sftp server must be configured with multiple keys (ssh-rsa, ecdsa-sha2-nistp256), and try to connect to it using the DefaultSftpSessionFactory. With setting the known_hosts with an ssh-rsa entry for that server and allowUnknownKeys to false.
The text was updated successfully, but these errors were encountered: