Fedora 23无密码ssh密钥在自动添加主机中不起作用 [英] Fedora 23 passwordless ssh key not working in automated host addition
问题描述
我已经安装了Fedora 23,并尝试使用以下方式进行无密码登录:
I have installed Fedora 23 and have tried to do a passwordless login with:
# ssh-copy-id ~/.ssh/id_dsa.pub user@host
已成功将密钥复制到主机,并且我已经在以下位置签入了主机:
which successfully copies the key to the host machine and I have checked in the host machine in:
# tail -n10 ~/.ssh/authorized_keys
我的PC名称存在于最后一行,但是在尝试登录时:
and my PC name exists as the last line but when trying to login:
# ssh user@host
我被要求输入密码!我试图登录到Ubuntu和CentOS并获得相同的结果.之前,我已经在多个Linux发行版(包括Fedora 21,CentOS和Ubuntu)上做到了这一点,而且效果很好.
I am asked for a password! I have tried to login to Ubuntu and CentOS and get the same result. I have done this previously with multiple linux distros including Fedora 21, CentOS and Ubuntu and it works just fine.
我需要这样做来完成自动添加主机的脚本,该脚本添加了一个主机,然后自动登录(add_user_host):
I need this to do finish the automated host addition script which adds a host and then logs in automatically (add_user_host):
#!/bin/bash
ssh-copy-id ~/.ssh/id_dsa.pub $1@$2;
ssh $1@$2;
您所要做的就是运行:
# add_user_host user host
推荐答案
Openssh-7.0已过时的DSA密钥.要使用它们,您需要在ssh_config
中指定PubkeyAcceptedKeyTypes +ssh-dss
(如
Openssh-7.0 obsoleted DSA keys. To use them you need to specify PubkeyAcceptedKeyTypes +ssh-dss
in your ssh_config
(as mentioned in your linked thread) to make them working, or rather use other keys (RSA, ed25519).
此案例在官方网站上也有其页面,并且在
This case has also its page on official webseite and part in release notes.
这篇关于Fedora 23无密码ssh密钥在自动添加主机中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!