# dsa证书无法登录ssh服务器问题
今天在docker上安装openssh-server,创建了dsa证书,把公钥加入到认证key,尝试登录本地,发现一直提示输入密码,无法登录
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
后来发现是DSA密钥不安全已经被openssh-server禁用
换成rsa即可
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys