Kylin Xinan およびその他のサーバーの SSH 問題で、一致する MAC が見つかりません。彼らのオファー: hmac-sha1-96、hmac-sha1、hmac-md5-96、hmac-md5

最近、Galaxy Kylin、Kylin Principal、Meditation などの多くのオペレーティング システム サーバーが ssh 接続に接続できませんでしたが、問題のほとんどは ssh アルゴリズムの不一致が原因です。

1. 以下を確認します。

journalctl --unit sshd --no-pager ssh ターゲット サーバー (ssh 接続先のサーバー) の sshd ログを表示します。

おそらくログを見れば原因が分かると思います

2.解決する

  • 最初のステップ: /etc/ssh/sshd_config ファイルを変更します。大まかに以下の変更アイデアがあります (1 つ選択してください)。

  1. (主に Galaxy Kirin) KexAlgorithms を追加 diffie-hellman-group1-sha1、diffie-hellman-group14-sha1、diffie-hellman-group-exchange-sha1、diffie-hellman-group-exchange-sha256、ecdh-sha2-nistp256、ecdh-sha2-nistp384、ecdh -sha2-nistp521、diff ie-hellman-group1-sha1、curve25519-sha256@ libssh.org

  1. (主に Kylin Principal Server Edition 用) HostkeyAlgorithms +ssh-rsa、ssh-dss を追加します。

  1. (主に Kylin Xinan デスクトップ バージョン) MAC hmac-sha2-512、hmac [email protected]、hmac-sha2-256、hmac [email protected]が次のように変更されました

MAC hmac-sha2-512、hmac [email protected]、hmac-sha2-256 、hmac-sha2-256-etm@ openssh.com 、hmac-sha1-96、hmac-sha1、hmac-md5-96、hmac-md5

  • ステップ 2: systemctl restart sshd は ssh サービスを再起動します

おすすめ

転載: blog.csdn.net/zzchances/article/details/128644044