VagrantでSolaris11を開く:127.0.0.1ポート2222とネゴシエートできません:一致するホストキータイプが見つかりません。引用:ssh-rsa、ssh-dss

VagrantでSolaris11を開く:127.0.0.1ポート2222とネゴシエートできません:一致するホストキータイプが見つかりません。引用:ssh-rsa、ssh-dss

私はこのVagrantfileを使います:

Vagrant.configure("2") do |config|

  config.vm.box = "jonatasbaldin/solaris11"
  config.vm.box_version = "1.0.0"
  
end

成功しましたが、vagrant up255vagrant ssh戻りコードで終了し、まったく出力されません。デバッグのためにこれを行います

$ ssh -v vagrant@localhost -p 2222

私は得る:

$ ssh -v vagrant@localhost -p 2222
OpenSSH_8.9p1 Ubuntu-3ubuntu0.1, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /home/mevatlave/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 267: Applying options for localhost
debug1: /etc/ssh/ssh_config line 288: Applying options for *
debug1: Connecting to localhost [127.0.0.1] port 2222.
debug1: Connection established.
debug1: identity file /home/mevatlave/.ssh/id_rsa type 0
debug1: identity file /home/mevatlave/.ssh/id_rsa-cert type -1
debug1: identity file /home/mevatlave/.ssh/id_ecdsa type -1
debug1: identity file /home/mevatlave/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/mevatlave/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/mevatlave/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/mevatlave/.ssh/id_ed25519 type -1
debug1: identity file /home/mevatlave/.ssh/id_ed25519-cert type -1
debug1: identity file /home/mevatlave/.ssh/id_ed25519_sk type -1
debug1: identity file /home/mevatlave/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/mevatlave/.ssh/id_xmss type -1
debug1: identity file /home/mevatlave/.ssh/id_xmss-cert type -1
debug1: identity file /home/mevatlave/.ssh/id_dsa type -1
debug1: identity file /home/mevatlave/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
debug1: Remote protocol version 2.0, remote software version Sun_SSH_2.2
debug1: compat_banner: no match: Sun_SSH_2.2
debug1: Authenticating to localhost:2222 as 'vagrant'
debug1: load_hostkeys: fopen /home/mevatlave/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group-exchange-sha256
debug1: kex: host key algorithm: (no match)
Unable to negotiate with 127.0.0.1 port 2222: no matching host key type found. Their offer: ssh-rsa,ssh-dss

オンラインで多くのソリューションを検索しましたが、成功しませんでした。どのようなヒントがありますか?

私が得るvirtualbox ttyからsshd[1234]: fatal: no hostkey alg

ベストアンサー1

SSHプロトコルにはさまざまな種類のキーがあり、それぞれ1つ以上の署名アルゴリズムを受け入れます。サーバー側で使用されるキーの種類は、RSA(ssh-rsa)およびDSA(ssh-dss)キーです。 RSAキーには、ssh-rsa(SHA-1)、rsa-sha2-256(SHA-256)、rsa-sha2-512(SHA-512)の3つの署名があります。後者の2つの署名のみが安全です。以前のssh-rsaシグネチャタイプとすべてのシグネチャは廃止さssh-dssれ、安全ではないSHA-1を使用します。 (使用されたDSAキーのサイズも現代の標準と比較して不適切です。)

残念ながら、あなたが使用している仮想マシンは安全でないアルゴリズムのみをサポートしているため、安全に接続する方法はありません。最善のアプローチは、さまざまなイメージを使用してより安全なオペレーティングシステムまたはより安全なオペレーティングシステム構成を達成することです。

この画像を使用する必要がある場合は、ssh -o HostKeyAlgorithms=+ssh-rsa -p 2222 vagrant@localhost安全でないアルゴリズムを有効にして実行してssh-rsa接続してください。

おすすめ記事