Discussion:
[JSch-users] Is it possible to determine, which identity was used for ssh connection
Svirkina, Irina
2015-04-20 13:07:51 UTC
Permalink
Hi everyone,

I'm using jgit and jsch.

JSch can be supplied with several sshkeys with help of addIdentity() method
(see Ex.). And so JSch having several identities finds suitable sshkeys
(identity) somehow by itself.

Ex.:
JSch jsch;
jsch.addIdentity(key1.getKeyName(), privateKey1, null, passPhrase1);
jsch.addIdentity(key2.getKeyName(), privateKey2, null, passPhrase2);
...

Is it possible to determine, which identity was used for ssh connection?

Thanks in advance, Irina

Loading...