Authentication through SSL with PEM file: How should I perform it?

82 views
Skip to first unread message

Luis Marcelo Rosso

unread,
Apr 28, 2016, 10:08:54 AM4/28/16
to sshj-users
Hi,

What should I do in order to get authenticated through SSL (with PEM file)?

Reviewing the supplied examples, I have not been able to find out how, at least at first sight.

Then, I performed a key search through the whole project's source code, looking for "SSL" and "PEM" keys, which returned the following classes:
1. PKCS8KeyFile
2. SshFixture

The latter is a test.

Then I have performed call history from both of these classes:
1. SshFixture: I have not found out any hint, at least at first sight.
2. PKCS8KeyFile: findings seem more relevant, and are shown in attached print screen.

Statically, there is a path till all the supplied examples. However, it is not available at runtime to any of them, as the class AuthHostbased does not have any reference from anywhere, not even searching through any kind of file. Hence, for each of the three "authPublickey" methods shown in the attached call history and implemented in the class SSHClient, I have implemented there a counterpart, "authHostbased", instantiating a AuthHostbased instead of a AuthPublickey. That way, I am finally having PKCS8KeyFile instantiated.

But authentication keeps failing.

I have attached modified version of SSHClient class, and logs shown in stdout before and after this code addition.

What am I doing wrong? What should I do?

Thanks in advance !

Luis
Screen Shot 2016-04-26 at 9.50.59 AM.png
after.log
before.log
SSHClient.java
Reply all
Reply to author
Forward
0 new messages