加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – sshd因“没有支持的密钥交换算法”错误而关闭

发布时间:2020-12-13 17:22:14 所属栏目:Linux 来源:网络整理
导读:sshd的 $/usr/sbin/sshd -f testconfig -p 22025 -ddebug1: sshd version OpenSSH_5.2p1debug1: private host key: #0 type 0 RSA1debug1: read PEM private key done: type RSAdebug1: private host key: #1 type 1 RSAdebug1: read PEM private key done:
sshd的
$/usr/sbin/sshd -f testconfig -p 22025 -d

debug1: sshd version OpenSSH_5.2p1
debug1: private host key: #0 type 0 RSA1
debug1: read PEM private key done: type RSA
debug1: private host key: #1 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #2 type 2 DSA
debug1: setgroups() failed: Operation not permitted
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-f'
debug1: rexec_argv[2]='testconfig'
debug1: rexec_argv[3]='-p'
debug1: rexec_argv[4]='22025'
debug1: rexec_argv[5]='-d'
debug1: Bind to port 22025 on 127.0.0.1.
Server listening on 127.0.0.1 port 22025.
Generating 1024 bit RSA key.
RSA key generation complete.
debug1: fd 4 clearing O_NONBLOCK
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 4 out 4 newsock 4 pipe -1 sock 7
debug1: inetd sockets after dupping: 3,3
Connection from 127.0.0.1 port 58477
debug1: Client protocol version 2.0; client software version OpenSSH_5.5
debug1: match: OpenSSH_5.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.2
debug1: privsep_preauth: successfully loaded Seatbelt profile for unprivileged child
debug1: list_hostkey_types: 
No supported key exchange algorithms
debug1: do_cleanup
debug1: do_cleanup
debug1: audit_event: unhandled event 12

SSH

$ssh dgl@127.0.0.1 -p 22025 -i ./id_rsa.pub -v
OpenSSH_5.5p1,OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /Users/dgl/.ssh/config
debug1: Reading configuration data /opt/local/etc/ssh/ssh_config
debug1: Connecting to 127.0.0.1 [127.0.0.1] port 22025.
debug1: Connection established.
debug1: identity file ./id_rsa.pub type 1
debug1: identity file ./id_rsa.pub-cert type -1
debug1: Remote protocol version 2.0,remote software version OpenSSH_5.2
debug1: match: OpenSSH_5.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.5
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 127.0.0.1

ssh_config中

Protocol 1,2
ListenAddress 127.0.0.1
HostKey ./ssh_host_key
HostKey ./ssh_host_rsa_key
HostKey ./ssh_host_dsa_key
RSAAuthentication yes
PubkeyAuthentication yes

解决方法

我只是遇到了同样的问题,通过将我的相对HostKey路径转换为绝对路径来解决它,即代替
HostKey ./ssh_host_key

放:

HostKey /home/dmitry/ssh_host_key

或者无论在哪里.

这个错误不是很有帮助吗?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读