Fedora 23 passwordless ssh key not working in automated host addition [closed]

戏子无情 提交于 2019-12-23 04:20:44

问题


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

and my PC name exists as the last line but when trying to login:

# ssh user@host

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.

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;

all you would do is run:

# add_user_host user host

回答1:


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.



来源:https://stackoverflow.com/questions/34511198/fedora-23-passwordless-ssh-key-not-working-in-automated-host-addition

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!