colin-lee / ganymed-ssh-2

Automatically exported from code.google.com/p/ganymed-ssh-2
Other
0 stars 0 forks source link

Use with unencrypted public key #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. set up an unencrypted public key for a user  (ssh-keygen -q -t rsa -N '' -f 
~/.ssh/id_rsa)

2.  Verify that you can log in using ssh to the remote host with just the 
username of the user set up in step 1 (no pass-phrase should be prompted):  ssh 
-l user somehost

3. Try to connect using gnaymed in some java code.
com.trilead.ssh2.Connection conn = null;
conn = new com.trilead.ssh2.Connection("somehost");
conn.connect();
boolean isAuthenticated = conn.authenticateWithNone("aqua");
if (isAuthenticated == false) {
     System.out.println("Authentication failed.");
} else {
     System.out.println("Authentication succeeded.");
}

What is the expected output? What do you see instead?

Expect Authenticated succeeded but get Authenticated failed followed by 
IllegalStateException.

What version of the product are you using? On what operating system?

trilead-ssh2.jar on windows 7 and linux

Please provide any additional information below.

The user's password on the remote host is hidden due to security policy.  One 
can only su to that user after logging in as oneself or set up an unencrypted 
public key for the user which is allowed.  What API do I use that will allow me 
to specify only the userid where the software recognizes that there is no need 
for a password or pass-phrase because the public key is not encrypted? 

Original issue reported on code.google.com by hikem...@gmail.com on 10 Feb 2014 at 5:49

GoogleCodeExporter commented 8 years ago
com.trilead.ssh2.Connection: this is a fork of our software which we do not 
support =)
Sorry, please repost in case you can reproduce the problem with the ganymed 261 
build.

Original comment by cleondris on 10 Feb 2014 at 11:41