【问题标题】:On sshd server how can I see what connection what cipher is using?在 sshd 服务器上,我如何查看密码使用的是什么连接?
【发布时间】:2017-01-24 10:41:55
【问题描述】:

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

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

谢谢

【问题讨论】:

    标签: linux ssh sshd


    【解决方案1】:

    您需要在服务器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 和压缩。

    【讨论】:

    • 你从哪里得到这个输出的?我在看:“# journalctl -u sshd |tail -10”但没有得到这样的行..
    • 配置文件更改后当然要重启sshd服务器。
    • 运行journalctl -u sshd | grep "server-&gt;client" 给了我这些行。它可能不在tail 中。
    • 是的,就是这样。但遗憾的是,它并没有说明哪个密码用于哪个连接..
    • 您会在其他日志的上下文中看到用户来自哪里(例如Connection from 192.168.122.1 port 49858 on 192.168.122.41 port 22Accepted publickey for root from 192.168.122.1 port 49858 ssh2: RSA SHA256:jLoy5uXEhlClW/u5mC8WRQ7a/AebWz93A+EeZMVnuMg)。
    猜你喜欢
    • 2017-09-03
    • 2012-04-21
    • 2017-05-06
    • 1970-01-01
    • 1970-01-01
    • 2014-04-27
    • 1970-01-01
    • 1970-01-01
    • 2010-09-24
    相关资源
    最近更新 更多