Quick Start

The basic template for creating a client connection is outlined below. This demonstrates how to create an SSH client connection using the Maverick NG API. 

     SshEngine ssh = new SshEngine();
     ssh.startup();

     SshClientContext sshContext = new SshClientContext(ssh);	
     sshContext.setUsername("lee");
     sshContext.addAuthenticator(new PasswordAuthenticator("xxxxx"));

     sshContext.addStateListener(new ConnectionStateListener() {

	@Override
	public void connected(final Connection con) {
				
	}
	@Override
	public void disconnected(Connection con) {
				
	}
     });
		
     ssh.connect("localhost", 22, sshContext);

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.