By default JSch is set to
config.put("server_host_key", "ssh-rsa,ssh-dss");
I'm operating under the assumption that JSch will try rsa and if that fails then
try dss. Is this assumption correct?
If it isn't, I'm left to ask what does setting the 'server_host_key' to both
ssh-rsa and ssh-dss do? Can a key use both of those values?
The known_hosts file I am using is entirely using ssh-dss. So by default when
trying to connect to a ssh-dss host JSch throws this exception:
UnknownHostKey: ssh-dss.example.com. RSA key fingerprint is
c5:7c:0a:58:54:6e:49:5c:45:42:af:58:96:d0:5b:5d
If I set it to JSch.setConfig("server_host_key", "ssh-dss,ssh-rsa") or
JSch.setConfig("server_host_key", "ssh-dss") then it works for my ssh-dss hosts.
Should I be parsing the known_hosts file to manually set the server_hosts_key in
JSch for a host that may use ssh-rsa or ssh-dss?
------------------------------------------------------------------------------
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users