0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SSH接続に対するエラーを、サーバ全体で行う

Posted at

概要

手元のPCやサーバから、NW機器などにログインしようとした際、セキュリティエラーにより拒否される場合がある。no matching key exchange method foundなど。

その場合、ユーザ配下の.ssh/configを基本的に操作することで解決させたりするが、この場合はそれぞれのユーザ毎にしか適応されない。これを、このサーバを使用する全ユーザで適応させるようにしたい。

解決策

以下の、openssh.configファイル自身を変更する。

/etc/crypto-policies/back-ends/openssh.config

対応例

no matching key exchange method found. Their offer: diffie-hellman-group1-sha1

openssh.configKexAlgorithmsdiffie-hellman-group1-sha1の設定を追加する。

sudo vi  /etc/crypto-policies/back-ends/openssh.config
記載内容
KexAlgorithms diffie-hellman-group1-sha1

no matching host key type found. Their offer: rsa-sha2-512

同じようにopenssh.configを編集して記載する。

記載内容
HostKeyAlgorithms ssh-rsa,ssh-dss,rsa-sha2-512

このように、ssh.configは、.sshは以下のconfigと同じように適応できるが、サーバ全体にユーザーに機能させることが可能。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?