#HostKeyAlgorithms ssh-ed25519,
[email protected],rsa-sha2-
256
,rsa-sha2-
512
#PubkeyAcceptedKeyTypes ssh
-ed25519,
[email protected],rsa-sha2-
256
,rsa-sha2-
512
# 在行尾增加
"
,ecdh-sha2-nistp521
"
,以满足ecdsa公钥方式登录(密钥长度521)
KexAlgorithms curve25519
-sha256,
[email protected],diffie-hellman-group-exchange-sha256,ecdh-sha2-
nistp521
# 在行尾增加
"
,ssh-rsa
"
,以满足RSA 登录
HostKeyAlgorithms ssh
-ed25519,
[email protected],rsa-sha2-
256
,rsa-sha2-
512
,ssh-
rsa
# 在行尾增加
"
,ssh-rsa
"
,以满足RSA 登录
PubkeyAcceptedKeyTypes ssh
-ed25519,
[email protected],rsa-sha2-
256
,rsa-sha2-
512
,ssh-rsa
4.重启sshd服务:
[root@localhost ~]# systemctl restart sshd