I am trying to ssh to localhost, but it's asking for a password every time.
What I tried:
ssh localhost
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
DSA keys are not accepted in recent versions of openssh
by default. You should use rsa
, which works fine and is considered more secure by the openssh
developers. If you really want to use dsa
keys, you should add
PubkeyAcceptedKeyTypes +ssh-dss
line into your sshd_config
and restart ssh
service.
-vvv
flag has a line debug3: receive packet: type 51
inside of the output that reveals that the authentification failed.
Jan 23, 2019 at 17:18
ssh -vv localhost