LoginSignup
0
0

More than 3 years have passed since last update.

CML2におけるubuntuのSSH設定

Last updated at Posted at 2021-05-13

この記事について

CML2内に立てたubuntuサーバからCiscoノードに対してsshができなかった時の対処方法

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

必要なSSH設定

  • 原因は新しいサーバでは古い暗号化方式がデフォルトではサポートされなくなっている
  • SSHクライアントにSSHサーバが使用している鍵交換方式と、共通鍵暗号化方式を設定
~/.ssh/config
Host 10.*
  KexAlgorithms +diffie-hellman-group1-sha1,diffie-hellman-group14-sha1 # 鍵交換方式の指定
  Ciphers aes128-ctr,aes192-ctr,aes256-ctr #共通鍵暗号化方式の指定

共通鍵暗号化方式はOSによってConfig内に記載あり。
共通鍵暗号方式がサーバの指定するものと一致しない場合、正しいパスワードを入力してもログイン不可。

iosvl2-0#sh run | i ssh
ip ssh version 2
ip ssh server algorithm encryption aes128-ctr aes192-ctr aes256-ctr
ip ssh client algorithm encryption aes128-ctr aes192-ctr aes256-ctr

以上

参考記事

OpenSSHの暗号化周りの設定について

0
0
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
0
0