Tag: aix

无法使用SSH.NET库连接到AIX(Unix)框 – 错误:值不能为空

我正在尝试连接到AIX盒并使用SSH.NET库执行一些命令。 以下是代码snipplet 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(); 当我尝试在sshClient.Connect()行连接时收到以下exception消息 {“值不能为空。\ r \ nParameter name:data”} 堆栈跟踪是 at Renci.SshNet.KeyboardInteractiveAuthenticationMethod.Authenticate(Session session) at Renci.SshNet.ConnectionInfo.Authenticate(Session session) at Renci.SshNet.Session.Connect() at Renci.SshNet.BaseClient.Connect() 我确信我传递的凭据是有效的,因为我能够使用具有相同凭据的PuTTY客户端登录 。 有任何想法吗?