AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / computer / 问题 / 1812760
Accepted
Rick Brian
Rick Brian
Asked: 2023-10-16 09:44:15 +0800 CST2023-10-16 09:44:15 +0800 CST 2023-10-16 09:44:15 +0800 CST

从客户端列出主机可用的 ssh 密码

  • 772

有没有办法让客户端在不使用 NMAP 的情况下检查可用的 SSH 密码和算法?

我已将 sshd_config 配置为禁用安全团队发现的一些密码和算法。

只是想测试一下自己这些密码现在是否不可用。

ssh
  • 1 1 个回答
  • 31 Views

1 个回答

  • Voted
  1. Best Answer
    dave_thompson_085
    2023-10-16T13:01:41+08:002023-10-16T13:01:41+08:00

    要测试服务器是否允许某种算法,最简单的方法是尝试使用它进行连接并查看服务器是否接受它,如下例所示:

    ssh -oCiphers=3des-cbc [user@]host # or briefer ssh -c...; see below
    ssh -oMACs=hmac-sha1 ditto # or briefer ssh -m...; probably should be rejected
    # may need to specify a non-AEAD cipher to get valid test of a MAC
    ssh -oKexAlgorithms=diffie-hellman-group1-sha1 ditto # should be rejected 
    ssh -oHostKeyAlgorithms=ssh-rsa ditto # ditto
    ssh -oPubkeyAcceptedAlgorithms=ssh-rsa ditto # below 8.5 use PubkeyAcceptedKeyTypes; ditto
    

    今天的“最佳实践”表示不应使用 3DES;它实际上并没有被破坏,但如果你发送千兆字节的数据,被动的对手可能能够检测到发生了重复的密码块,但(使用 CBC)并不是说它是重复的明文,这将是加密中的“破坏”理论,但在实践中不太可能有任何用处。如果您想浪费时间深入研究这个老鼠洞,请参阅 crypto.SX 或可能的 security.SX。

    hmac-sha1 和 ssh-rsa 或 ssh-dss(两者都使用 sha1)实际上也没有被破坏,但不再被认为提供足够的安全边际。

    如果您想查看除(可能)客户端身份验证之外的所有服务器允许的算法,只需进行连接,ssh -vv然后查看这部分输出:

    debug2: peer server KEXINIT proposal
    debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
    debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
    debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
    debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
    debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
    debug2: MACs stoc: [email protected],umac-12[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
    debug2: compression ctos: none,z[email protected]
    debug2: compression stoc: none,[email protected]
    

    对于除客户端身份验证之外的所有内容,以及这(稍后)部分(可能会被省略,具体取决于服务器软件):

    debug1: SSH2_MSG_EXT_INFO received
    debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
    

    用于客户端身份验证(即被服务器接受)。

    • 0

相关问题

  • OpenVPN 可以连接,流量有效但我不在本地网络中

  • 如何使用 GUI 远程访问 EC2 控制台

  • 需要 LDAP 身份验证 * 和 * ssh 身份验证

  • 加载密钥“ec256.pem”:尝试从私钥生成公钥时抛出无效格式

  • 为什么 chown 600 id_rsa 修复权限问题?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve