Próbuję połączyć się z AIX polu i wykonać kilka poleceń za pomocą SSH.NET
bibliotekę. Poniżej znajduje się kod snippletNie można połączyć AIX (UNIX) pudełka z SSH.NET do Biblioteki - Błąd: Wartość nie może być null
KeyboardInteractiveAuthenticationMethod kauth = new KeyboardInteractiveAuthenticationMethod(username);
PasswordAuthenticationMethod pauth = new PasswordAuthenticationMethod(username, password);
ConnectionInfo connectionInfo = new(ConnectionInfo(servername, 22, username, pauth,kauth);
SshClient sshClient = new SshClient(connectionInfo);
sshClient.Connect();
SshCommand sshCommand = sshClient.RunCommand("mpstat");
Console.WriteLine(sshCommand.Result);
Console.ReadKey();
uzyskać następujące wyjątek wiadomość gdy próbuję łączyć w linii sshClient.Connect()
{ "Wartość nie może być null \ r \ nParameter nazwy.: dane "}
ślad stos jest
at Renci.SshNet.KeyboardInteractiveAuthenticationMethod.Authenticate(Session session)
at Renci.SshNet.ConnectionInfo.Authenticate(Session session)
at Renci.SshNet.Session.Connect()
at Renci.SshNet.BaseClient.Connect()
Jestem przekonany, że poświadczenia mijam są ważne, ponieważ jestem stanie zalogować się użyciu klienta PuTTY
z tych samych poświadczeń. Jakieś pomysły?