香港/韩国云服务器、独立服务器租用

FlashFXP通过sftp连接提示“SSH 错误: 协商密钥交换算法失败”

自营机房/高防服务器/高防VPS/美国高防/洛杉矶VPS/洛杉矶高防服务器

赵容用习惯了FlashFXP,遇到几次sftp连接debian12系统提示“SSH错误: 协商密钥交换算法失败”,每次都要去搜索解决,这里记录下来方便直接在博客找,如果有遇到相同问题的朋友也可以参考。

flashfxp-sftp

错误信息如上图,我在某个商家的3台VPS都遇到这个问题,估计他们的debian12系统模板问题,不过解决也挺简单,通过修改ssh配置解决。

nano /etc/ssh/sshd_config

加入:

KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr
HostKeyAlgorithms ssh-ed25519,rsa-sha2-256,rsa-sha2-512,ssh-rsa

保存后重启ssh服务即可:

sudo systemctl restart sshd

本站QQ群:683851361,联系我:admin#zrblog.net

便宜VPS/10美元VPS/洛杉矶、圣何塞等多个机房