Heyy! J'utilise com.trilead.ssh2.Connection
dans java 7
pour ouvrir une connexion.impossible d'authentifier un com.trilead.ssh2.Connection
Lors du test j'ouvre une connexion avec localhost
sur le port 22
:
Connection connection = new Connection("localhost", 22);
Je suis en train d'authentifier avec authenticateWithPublicKey
méthode:
char[] key = IOUtils.toString(new FileInputStream("keyLocation")).toCharArray();
boolean authenticated = connection.authenticateWithPublicKey("myUsername", key, "");
Mais il n'est pas authentifiez. Je cours sur un mac sierra
, je me demande si cela a quelque chose à faire. J'utilise une paire de clés dsa
.
Merci!