hi Oralloy.
No problem with the mistake. It happens to everyone:)
Here is the output I get from my connect and authentication code:
Also, I tried it with an empty password and that failed also.
-
ssh.connect(host, new ConsoleKnownHostsKeyVerification("$HOME/.ssh/known_hosts"));
-
-
-
System.out.println("BEFORE AUTHENTICATION");
-
//Authenticate
-
-
PasswordAuthenticationClient passwordAuthenticationClient = new PasswordAuthenticationClient();
-
passwordAuthenticationClient.setUsername(user);
-
// passwordAuthenticationClient.setPassword(password);
-
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.publickey.SshKeyPairF actory <clinit>
INFO: Loading public key algorithms
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.configuration.ConfigurationLoad er initialize
INFO: JAVA version is 1.6.0_11-rev
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.configuration.ConfigurationLoad er initialize
INFO: Extension /usr/local/jdk1.6.0_11/jre/lib/ext/sunjce_provider.jar being added to classpath
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.util.ExtensionClassLoader add
INFO: Adding /usr/local/jdk1.6.0_11/jre/lib/ext/sunjce_provider.jar to the extension classpath
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.configuration.ConfigurationLoad er initialize
INFO: Extension /usr/local/jdk1.6.0_11/jre/lib/ext/sunpkcs11.jar being added to classpath
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.util.ExtensionClassLoader add
INFO: Adding /usr/local/jdk1.6.0_11/jre/lib/ext/sunpkcs11.jar to the extension classpath
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.configuration.ConfigurationLoad er initialize
INFO: Extension /usr/local/jdk1.6.0_11/jre/lib/ext/dnsns.jar being added to classpath
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.util.ExtensionClassLoader add
INFO: Adding /usr/local/jdk1.6.0_11/jre/lib/ext/dnsns.jar to the extension classpath
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.configuration.ConfigurationLoad er initialize
INFO: Extension /usr/local/jdk1.6.0_11/jre/lib/ext/tools.jar being added to classpath
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.util.ExtensionClassLoader add
INFO: Adding /usr/local/jdk1.6.0_11/jre/lib/ext/tools.jar to the extension classpath
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.configuration.ConfigurationLoad er initialize
INFO: Extension /usr/local/jdk1.6.0_11/jre/lib/ext/localedata.jar being added to classpath
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.util.ExtensionClassLoader add
INFO: Adding /usr/local/jdk1.6.0_11/jre/lib/ext/localedata.jar to the extension classpath
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.cipher.SshCipherFacto ry <clinit>
INFO: Loading supported cipher algorithms
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.kex.SshKeyExchangeFac tory <clinit>
INFO: Loading key exchange methods
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.compression.SshCompre ssionFactory <clinit>
INFO: Loading compression methods
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.hmac.SshHmacFactory <clinit>
INFO: Loading message authentication methods
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.TransportProtocolComm on startTransportProtocol
INFO: Starting transport protocol
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.TransportProtocolComm on run
INFO: Registering transport protocol messages with inputstream
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.TransportProtocolComm on negotiateVersion
INFO: Negotiating protocol version
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.TransportProtocolComm on negotiateVersion
INFO: Protocol negotiation complete
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.TransportProtocolComm on beginKeyExchange
INFO: Starting key exchange
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.kex.DhGroup1Sha1 performClientExchange
INFO: Starting client side key exchange.
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.AbstractKnownHostsKey Verification verifyHost
INFO: Verifying prdgc103b,10.170.114.4 host key
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.TransportProtocolClie nt verifyHostKey
INFO: The host key signature is valid
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.TransportProtocolComm on completeKeyExchange
INFO: Completing key exchange
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.cipher.SshCipherFacto ry newInstance
INFO: Creating new blowfish-cbc cipher instance
Sep 21, 2010 10:11:38 AM com.sshtools.j2ssh.transport.cipher.SshCipherFacto ry newInstance
INFO: Creating new blowfish-cbc cipher instance
BEFORE AUTHENTICATION
YOU FAILED IN THE CONNECT
Error: com.sshtools.j2ssh.authentication.AuthenticationPr otocolException: Username and password cannot be null!