Does anyone have any code for connecting to a remote server using java and an ssh key. We dont have a password for this server, we just use our username and our ssh keys
2 Answers
jsch is a pure java SSH implementation that supports SSH key auth.
1 Comment
ymnk
FYI, refer to its sample program, http://www.jcraft.com/jsch/examples/UserAuthPubKey.java.html
SSHJ have very easy & clean API for uploading files and for executing commands on remote systems.