LoginSignup
4
5

More than 3 years have passed since last update.

古いマシーンに ssh 接続できない時の対策

Last updated at Posted at 2020-06-10

Amazon Linux 2 や、CentOS 8 からは ssh 接続できても、Arch Linux や、Ubuntu 20.04、Alpine Linux から ssh 接続できないマシーンがありました。

$ ssh aaa@133.110.23.29
Unable to negotiate with 133.110.23.29 port 22: no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1

解決方法 .ssh/config を作成

.ssh/config
HOST 133.110.23.29
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers aes128-cbc

接続して OS の様子を見ると

$ uname -a
Linux *** 2.4.20-46.7.legacy #1 Sat Mar 4 15:25:19 EST 2006 i686 unknown
$ cat /etc/redhat-release 
Red Hat Linux release 7.3 (Valhalla)
4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5