在 sshd 服务器上,我如何查看密码正在使用的连接?

On sshd server how can I see what connection what cipher is using?

我正在管理一个 ssh 服务器,为多个用户提供服务。有人要求可以使用密码"arcfour",所以我启用了它。

但我现在正在尝试实际查看哪个连接和用户正在使用它。有没有办法列出连接以及每个连接中使用的密码的信息?

谢谢

您需要在服务器sshd_config中设置LogLevel DEBUG。然后你应该看到消息为

debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none [preauth]
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none [preauth]

说明连接过程中使用的密码、MAC和压缩。