Fedora 23 无密码 ssh 密钥在自动主机添加中不起作用
Fedora 23 passwordless ssh key not working in automated host addition
我已经安装了 Fedora 23 并尝试使用以下方法进行无密码登录:
# ssh-copy-id ~/.ssh/id_dsa.pub user@host
成功将密钥复制到主机,我已在主机中签入:
# tail -n10 ~/.ssh/authorized_keys
我的 PC 名称存在于最后一行,但在尝试登录时:
# ssh user@host
系统要求我输入密码!我尝试登录 Ubuntu 和 CentOS 并获得相同的结果。我之前用多个 linux 发行版完成了此操作,包括 Fedora 21、CentOS 和 Ubuntu,并且工作正常。
我需要这个来完成自动添加主机的脚本,该脚本添加一个主机然后自动登录 (add_user_host):
#!/bin/bash
ssh-copy-id ~/.ssh/id_dsa.pub @;
ssh @;
你要做的就是运行:
# add_user_host user host
Openssh-7.0 过时的 DSA 密钥。要使用它们,您需要在 ssh_config
中指定 PubkeyAcceptedKeyTypes +ssh-dss
(如您的 linked thread 中所述)以使它们正常工作,或者更确切地说使用其他密钥(RSA、ed25519)。
这个案例还有它的page on official webseite and part in release notes。
我已经安装了 Fedora 23 并尝试使用以下方法进行无密码登录:
# ssh-copy-id ~/.ssh/id_dsa.pub user@host
成功将密钥复制到主机,我已在主机中签入:
# tail -n10 ~/.ssh/authorized_keys
我的 PC 名称存在于最后一行,但在尝试登录时:
# ssh user@host
系统要求我输入密码!我尝试登录 Ubuntu 和 CentOS 并获得相同的结果。我之前用多个 linux 发行版完成了此操作,包括 Fedora 21、CentOS 和 Ubuntu,并且工作正常。
我需要这个来完成自动添加主机的脚本,该脚本添加一个主机然后自动登录 (add_user_host):
#!/bin/bash
ssh-copy-id ~/.ssh/id_dsa.pub @;
ssh @;
你要做的就是运行:
# add_user_host user host
Openssh-7.0 过时的 DSA 密钥。要使用它们,您需要在 ssh_config
中指定 PubkeyAcceptedKeyTypes +ssh-dss
(如您的 linked thread 中所述)以使它们正常工作,或者更确切地说使用其他密钥(RSA、ed25519)。
这个案例还有它的page on official webseite and part in release notes。