mkj / dropbear

Dropbear SSH
https://matt.ucc.asn.au/dropbear/dropbear.html
Other
1.71k stars 404 forks source link

cannot login just with private key #259

Closed tr4v3ler closed 10 months ago

tr4v3ler commented 11 months ago

server:

./dropbearmulti dropbearkey -t rsa -f ./id_dropbear_server
./dropbearmulti dropbear -r ./id_dropbear_server -p 10.176.39.125:8888

client:

./dropbearmulti dbclient -i ./id_dropbear_server tr4v3ler@10.176.39.125 -p 8888

server log:

[643121] Nov 20 21:09:39 Child connection from 10.176.39.165:59218
[643121] Nov 20 21:09:41 /home/tr4v3ler/.ssh/authorized_keys must be owned by user or root, and not writable by others
[643121] Nov 20 21:10:38 Bad password attempt for 'tr4v3ler' from 10.176.39.165:59218
[643121] Nov 20 21:10:58 Bad password attempt for 'tr4v3ler' from 10.176.39.165:59218

client log:

Host '10.176.39.125' is not in the trusted hosts file.
(ssh-rsa fingerprint sha1!! 6b:5c:5c:55:ea:8e:f5:81:a7:8f:54:5b:76:c6:03:78:4e:15:9b:b4)
Do you want to continue connecting? (y/n) y
tr4v3ler@10.176.39.125's password:
tr4v3ler@10.176.39.125's password:
mkj commented 11 months ago

[643121] Nov 20 21:09:41 /home/tr4v3ler/.ssh/authorized_keys must be owned by user or root, and not writable by others

If you chmod 700 /home/tr4v3ler/.ssh/authorized_keys it will probably work. I guess dropbearkey should set umask 077 before writing a key file.

tr4v3ler commented 10 months ago

[643121] Nov 20 21:09:41 /home/tr4v3ler/.ssh/authorized_keys must be owned by user or root, and not writable by others

If you chmod 700 /home/tr4v3ler/.ssh/authorized_keys it will probably work. I guess dropbearkey should set umask 077 before writing a key file.

Thanks for your reply. I later gave up using this tool.