C# 调用Renci.SshNet 的SSH类库,登陆 suse linux系统,如果没有配置,会报错:
Renci.SshNet.Common.SshAuthenticationException: No suitable authentication method found to complete
1、需要root登陆os,配置 /etc/ssh/sshd_config里面的
#PasswordAuthentication no 为 PasswordAuthentication yes
2、然后重启SSH服务:sudo systemctl restart sshd