IntelliJ IDEA:SSH 連接錯誤“無法達成結算”,而 Filezilla 中可以進行相同的連接

IntelliJ IDEA:SSH 連接錯誤“無法達成結算”,而 Filezilla 中可以進行相同的連接

在項目連線對話方塊中按一下「測試連線」時出現錯誤如下:

連接到“XXXXXX-ssh.services.easyname.eu”失敗。無法達成和解:[diffie-hellman-group1-sha1, diffie-hellman-group-exchange-sha1] 和 [curve25519-sha256, [電子郵件受保護]、 ecdh-sha2-nistp256、ecdh-sha2-nistp384、ecdh-sha2-nistp521、diffie-hellman-group-exchange-sha256、diffie-hellman-group16-sha512、diffie-hellman-18-sha512、group16-sha512、diffie-hellman-18-sha512、18-1212118-1212118-121212 月-sha256,迪菲-赫爾曼-group14-sha1]

您知道這個錯誤意味著什麼嗎?

答案1

我有同樣的問題。

.IntelliJIdea2019.2/system/log/idea.log我看到

2019-09-22 13:43:58,474 [649136973]   WARN - z.sshj.transport.TransportImpl - Dying because - Unable to reach a settlement: [ssh-dss] and [rsa-sha2-512, rsa-sha2-256, ssh-rsa, ssh-ed25519] 
net.schmizz.sshj.transport.TransportException: Unable to reach a settlement: [ssh-dss] and [rsa-sha2-512, rsa-sha2-256, ssh-rsa, ssh-ed25519]
    at net.schmizz.sshj.transport.Proposal.firstMatch(Proposal.java:145)
    at net.schmizz.sshj.transport.Proposal.negotiate(Proposal.java:129)
    at net.schmizz.sshj.transport.KeyExchanger.gotKexInit(KeyExchanger.java:224)
    at net.schmizz.sshj.transport.KeyExchanger.handle(KeyExchanger.java:356)
    at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:503)
    at net.schmizz.sshj.transport.Decoder.decodeMte(Decoder.java:159)
    at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:79)
    at net.schmizz.sshj.transport.Decoder.received(Decoder.java:231)
    at net.schmizz.sshj.transport.Reader.run(Reader.java:59)

顯然,這是因為 [ssh-dss] 的客戶端報價和伺服器清單 [rsa-sha2-512、rsa-sha2-256、ssh-rsa、ssh-ed25519] 不相交,因此協議無法達成協議相互支持的ssh演算法.

我遵循了以下建議https://intellij-support.jetbrains.com/hc/en-us/community/posts/360004370099-DataGrip-2019-2-RC-SSH-Tunnelling-no-longer-works來解決這個問題。

首先,我發現我有以下內容/etc/ssh/ssh_config

# Custom options from `extraConfig`, to override generated options


# Generated options from other settings
Host *
AddressFamily any

XAuthLocation /nix/store/mpa2k8as7sympa93rzvrvkmhrh6pnahi-xauth-1.0.10/bin/xauth


ForwardX11 no

PubkeyAcceptedKeyTypes +ssh-dss
HostKeyAlgorithms +ssh-dss

然後我添加了以下內容~/.ssh/config

Host *
    HostKeyAlgorithms rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-ed25519

這解決了我的問題。

相關內容