Browse Source
JSch prefers ssh-rsa key type. When the remote server supports ssh-rsa key type then this key type will be used even if the known_hosts file contains a host key for that host, but with different key type. This caused an unexpected UnknownHostKey error. To fix the issue first scan the known_hosts, the HostKeyRepository in JSch API, for any already existing host keys for the target host and modify the default session settings to prefer their algorithms. However, do this only if there is no HostKeyAlgorithms setting active. Change-Id: I236df2a860ddd9289a0a820ddf09c2dea3673d36stable-5.1
Saša Živkov
6 years ago
1 changed files with 42 additions and 0 deletions
Loading…
Reference in new issue