Can we use JSch for SSH key-based communication?
I am using JSch for sftp communication, now i want to use facilitate the key-based authentication, key is loaded on client and server machine once by my network team and all later communication would be only user based for which we have loaded the key. sftp -oPort=10022 jmark@192.18.0.246 as tjill@192.18.0.135 like this command work fine and connect to the sftp, how i can achieve this functionality programmatically. if it is not possible using JSch, please suggest some other library. I came across Apache SSHD . It is possible. Have a look at JSch.addIdentity(...) This allows you to use key