警告:更改用户后,/etc/ssh/primes消息中没有合适的primes';密码

警告:更改用户后,/etc/ssh/primes消息中没有合适的primes';密码,ssh,macos,.net,Ssh,Macos,.net,因此,我使用SSH.Net库从.Net应用程序中执行一些操作,以触发远程Mac OS设备上的操作。 更改用户密码后,我设法以某种方式破坏了该功能,system.log向我显示以下消息: WARNING: no suitable primes in /etc/ssh/primes 图书馆本身给了我这样的信息: An exception of type 'Renci.SshNet.Common.SshAuthenticationException' occurred in Renci.SshN

因此,我使用SSH.Net库从.Net应用程序中执行一些操作,以触发远程Mac OS设备上的操作。 更改用户密码后,我设法以某种方式破坏了该功能,system.log向我显示以下消息:

 WARNING: no suitable primes in /etc/ssh/primes 
图书馆本身给了我这样的信息:

An exception of type 'Renci.SshNet.Common.SshAuthenticationException' occurred in Renci.SshNet.dll but was not handled in user code

Additional information: No suitable authentication method found to complete authentication.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 6 out 6 newsock 6 pipe -1 sock 9
debug1: inetd sockets after dupping: 5, 5
Connection from 172.16.115.19 port 44670 on 192.168.202.110 port 2222
debug1: Client protocol version 2.0; client software version Renci.SshNet.SshClient.0.0.1
debug1: no match: Renci.SshNet.SshClient.0.0.1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
debug2: fd 5 setting O_NONBLOCK
debug2: Network child is on pid 569
debug1: list_hostkey_types:  [preauth]
No supported key exchange algorithms [preauth]
debug1: do_cleanup [preauth]
debug1: monitor_read_log: child log fd closed
debug1: do_cleanup
debug1: Killing privsep child 569
debug1: audit_event: unhandled event 12
SSHD debug给了我以下消息:

An exception of type 'Renci.SshNet.Common.SshAuthenticationException' occurred in Renci.SshNet.dll but was not handled in user code

Additional information: No suitable authentication method found to complete authentication.
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 6 out 6 newsock 6 pipe -1 sock 9
debug1: inetd sockets after dupping: 5, 5
Connection from 172.16.115.19 port 44670 on 192.168.202.110 port 2222
debug1: Client protocol version 2.0; client software version Renci.SshNet.SshClient.0.0.1
debug1: no match: Renci.SshNet.SshClient.0.0.1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
debug2: fd 5 setting O_NONBLOCK
debug2: Network child is on pid 569
debug1: list_hostkey_types:  [preauth]
No supported key exchange algorithms [preauth]
debug1: do_cleanup [preauth]
debug1: monitor_read_log: child log fd closed
debug1: do_cleanup
debug1: Killing privsep child 569
debug1: audit_event: unhandled event 12
我猜这与密码更改后更改的密钥有关,但我不是100%确定

我猜这与密码更改后更改的密钥有关,但我不是100%确定

没有

谈论密钥交换算法。日志不完整(
-ddd
将告诉您更多信息),并且来自此级别中不太详细的旧版本。但是我猜您的服务器不再支持
SSH.Net
库提供的方法了

首先我会去升级图书馆。第二种可能性是允许在服务器上使用传统的Kex算法,例如:

KexAlgorithms曲线25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,diffie-hellman-group-exchange-sha1


在您的
sshd\u配置中(基本上是添加
diffie-hellman-group1-sha1
diffie-hellman-group1-exchange-sha1
,它们现在被认为是不安全的!)。

我建议尝试连接正常的命令行SSH客户端(如果有帮助的话,使用
-v
)。这至少会告诉您这是服务器上的问题还是您在使用客户端库时所做的一些奇怪的事情。这实际上没有任何问题。。我可以毫无问题地与Kitty连接。在这种情况下,服务器端调试日志将派上用场。以root用户身份在服务器上运行
sshd-d-d-p2222
,然后从客户端连接到端口2222。将这些日志编辑到你的问题中。它告诉我:sshd-re-exec需要使用绝对路径执行是的,所以你应该按照它说的做:使用绝对路径<代码>/usr/sbin/sshd-d-d-p2222
或您的
sshd
所在的任何位置。