背景:我正在关注指引通过 SSH 从 Windows 调试在 CentOS 7 虚拟机上运行的 .NET 应用程序。而且我对 nix 上的 SSH 几乎一无所知。
问题:VS 抱怨它找不到任何通用密码来与 CentOS SSH 服务器通信。我随机选择了一个 diffie-hellman 并将其放入其中,/etc/ssh/sshd_config
如下所示:Ciphers diffie-hellman-group-exchange-sha256
。之后我尝试再次启动守护进程并收到此错误:
> systemctl status sshd.service
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Mon 2021-04-19 17:32:27 +07; 11s ago
Docs: man:sshd(8)
man:sshd_config(5)
Process: 3077 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=255)
Main PID: 3077 (code=exited, status=255)
Apr 19 17:32:27 localhost.localdomain systemd[1]: sshd.service: main process exited, code=exited, status=255/n/a
Apr 19 17:32:27 localhost.localdomain systemd[1]: Failed to start OpenSSH server daemon.
Apr 19 17:32:27 localhost.localdomain systemd[1]: Unit sshd.service entered failed state.
Apr 19 17:32:27 localhost.localdomain systemd[1]: sshd.service failed.
检查服务状态为我提供更多信息:
> systemctl status sshd
Apr 19 17:34:34 localhost.localdomain systemd[1]: Starting OpenSSH server daemon...
-- Subject: Unit sshd.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sshd.service has begun starting up.
Apr 19 17:34:34 localhost.localdomain sshd[3083]: /etc/ssh/sshd_config line 29: Bad SSH2 cipher spec 'diffie-hellman-group-exchange-sha256'.
Apr 19 17:34:34 localhost.localdomain systemd[1]: sshd.service: main process exited, code=exited, status=255/n/a
Apr 19 17:34:34 localhost.localdomain systemd[1]: Failed to start OpenSSH server daemon.
-- Subject: Unit sshd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sshd.service has failed.
--
-- The result is failed.
Apr 19 17:34:34 localhost.localdomain systemd[1]: Unit sshd.service entered failed state.
Apr 19 17:34:34 localhost.localdomain systemd[1]: sshd.service failed.
我应该怎么做才能让VS连接到CentOS?