TLDR
- xcodeをインストール、または最新にアップデートしましょう。
概要
AWS SSOを使ってEC2にsshしていたのですが突然 ssh_exchange_identification: Connection closed by remote host
というエラーが出て接続できなくなってしまいました。
一見ssh
コマンドでエラーが出ていたのでssh関連かな?と~/.ssh/config
やpermission周りを疑っていたのですが session-manager-plugin
コマンドを入力すると exec: Failed to execute process '/usr/local/sessionmanagerplugin/bin/session-manager-plugin', unknown error number 86
というエラーが出るようになっていることに気づきました。
少しネットで調べてみるとsession-manager-pluginのissueに
After running the following command, session-manager-plugin works:
softwareupdate --install-rosetta --agree-to-license
のように書いてあったのでXcodeをアップデートしたら無事なおりました。
この手のエラーは地味ハマりますね。。