.ssh/config
の設定次第で表題のエラーが出ることがある。
エラー
ssh_exchange_identification: Connection closed by remote host
問題のある設定
Host 4t_Bastion
HostName xx.xx.xx.xxx
User ubuntu
IdentityFile ~/.ssh/secret_key
対策
頭が数字から始まるHost名を指定していると同エラーが発生する。なのでHost名を 4t_Bastion
=> test_Bastion
に変更。
Host test_Bastion
HostName xx.xx.xx.xxx
User ubuntu
IdentityFile ~/.ssh/secret_key
環境
- macOS High Sierra
- ubuntu:
16.4 LTS