首页 > 技术文章 > raspberry pi 4b 不能用 SSH secure file transfer 连接

bear129 2021-04-12 10:49 原文

2020.4.16  这个方法也适用于 ubuntu 20.04 lts arm64 版本。

1. 问题描述

   系统是 armhf-lite版,   使用 SSH secure client 不能连接, 提示“Algorighm negotiation failed.”

 

2. 分析:

    网上找了下,有个说要在 /etc/ssh/sshd_config 最后面加东西, 方向是对的。但加的东西不对。

 

3. in action

   在树莓派的shell输入: man ssh_config 5,   把里面的Ciphers部分的内容复制到

    /etc/ssh/sshd_config.

   然后再: ssh -Q kex

    把输出的内容也 copy进 /etc/ssh/sshd_config

最终在/etc/ssh/ssh_config最后面,加的东西是这样的:

  

Ciphers  3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,curve25519-sha256,curve25519-sha256@libssh.org

 加完 sudo init 6 重启

推荐阅读