一例ssh key 无密码登录失败案例 (dsa,openssh7)

系统ubuntu16

ssh版本

server:~# ssh -V
OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g  1 Mar 2016

历史原因,客户端 key加密格式为dsa

id_dsa.pub
id_dsa

排查结果:openssh 7 以上默认不支持dsa  ( ssh-dss)加密认证

修改如下:

步骤1:服务器sshd设定

cat /etc/ssh/sshd_config 

RSAAuthentication yes
PubkeyAuthentication yes

#新添加以下行
PubkeyAcceptedKeyTypes=+ssh-dss

步骤2: 清理掉之前ssh-copy-id的密钥

步骤3: 重新copyid

原文地址:https://www.cnblogs.com/infaaf/p/10175063.html