public class Connection extends Object
Constructor and Description |
---|
Connection(String username,
String uri,
boolean withCipher,
String keyFile)
Establish a connection to a remote system.
|
public Connection(String username, String uri, boolean withCipher, String keyFile) throws com.jcraft.jsch.JSchException, Exception
username
- the username to use to connect to the remote systemuri
- the URI for the remote system.withCipher
- whether to encrypt the data transfer. True will encrypt.keyfile
- the name of the file contain the SSH key. Used only with the scp protocolcom.jcraft.jsch.JSchException
- if unable to connect to remote host using SSH protocol.Exception
- if any other error occurs.public String getLastMessage()
Copyright © 2014-2016 Regents University of California. All Rights Reserved.