Heyy!com.trilead.ssh2.Connectionを認証できません。
私は接続を開くためにjava 7
にcom.trilead.ssh2.Connection
を使用しています。テストする場合
私はポート22
上localhost
との接続を開いています:
Connection connection = new Connection("localhost", 22);
その後、私はauthenticateWithPublicKey
方法で認証しようとしています:
char[] key = IOUtils.toString(new FileInputStream("keyLocation")).toCharArray();
boolean authenticated = connection.authenticateWithPublicKey("myUsername", key, "");
しかし、それが認証されていません。私はmac sierra
で走っていますが、それは何かがあるかどうか疑問に思っています。私はdsa
鍵のペアを使用しています。
ありがとうございます!