[[役に立つテクニック集]]

boronは2021年現在CentOS5で運用されており、SSHDが古いため、macOSをMonterey(12.0.1)にアップデートした際、以下のようなエラーが出てssh接続できなくなりました。

  $ ssh boron.donotfree.com
  Unable to negotiate with 13.230.120.105 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
  $  

原因は古い鍵交換方式を新しいmacOSのsshコマンドがサポートしなくなったからですが、古い鍵交換方式を明示的に.ssh/configファイルに指定してやることで、簡単に解決します。

古い鍵交換方式はホスト名と対応して1行目ホスト名、2行目鍵交換方式を以下のように記述して書いておくことで対応します。

 $ cat ~/.ssh/config 
 Host boron.donotfree.com
 KexAlgorithms +diffie-hellman-group1-sha1
 $

▼参照
▼参照~
https://shsm385.hatenablog.com/entry/2018/10/17/161258

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS