【发布时间】:2020-08-01 13:24:27
【问题描述】:
我正在尝试在 Windows 10 计算机上通过 ssh 连接到我大学的远程服务器。
我安装了 OpenSSH。当我第一次尝试 ssh 时,我会收到错误
no kex alg
做一些谷歌搜索,我将以下内容放在我的 /.ssh/config 文件中
KexAlgorithms kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
但是,现在当我尝试 ssh 时,我收到以下错误:
/cygdrive/c/Users/name/.ssh/config: line 3: Bad configuration option: KexAlgorithms
/cygdrive/c/Users/name/.ssh/config: terminating, 1 bad configuration options
我刚开始尝试这个并且已经沮丧了几个小时。有谁知道我该如何解决这个问题?谢谢你:)
更新:根据评论将我的配置文件更改为此,仍然出现错误:
Host name@remote_server
HostName name@remote_server
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
错误消息仍然相同,第 3 行 KeyAlgorithmns 仍然出现错误
【问题讨论】:
-
尝试将
KexAlgorithms kexalgorithms更改为KexAlgorithms。 -
改了还是一样的错误。