SSH接続の公開鍵認証でハマった話。(C# SSH.NET)
tos5511.hatenablog.com 続きです。パスワード認証で実装したものの、せっかくだから公開鍵認証もやっておこう! なんて、軽く取り掛かったらちょっとハマったので共有しておきます。 var key = new PrivateKeyFile("openssh.key"); var connectionInfo = new ConnectionInfo("サーバIP", sshport , "ユーザ", new PrivateKeyAuthenticationMethod("ユーザ", key) ); var client = new SshClient(connectionInfo…
2019/03/13 21:36