Good day, I tried to log in with a public/private key (I use SSH dropbear) by following these steps:
ssh-keygen
ssh-copy-id dietpi@ipserver
In this case I throw a permission error because I have disabled access to ssh with root user, so I had to re-enable the root user to ssh and run the command in mention
ssh-copy-id root@ipserver
The authorized key is placed in /etc/dropbear/authorized_keys
after copying /etc/dropbear/authorized_keys to /home/dietpi/.ssh/authorized_keys that is my user, since I want to use it in a specific user not at root, as it will be disabled later
Hi, thanks for answer, Iām using cygwin64, But the problem is that he doesnāt ask me for the private public key, he just asks me for the password and lets me in without problems. Regards
I never used cygwin but is there a point within client configuration where you can specify the privat SSH key to be used? At least this is how it works within Putty.
Thank you for answering, you could confirm to me if the way I mention is the right way to start session? And you could explain to me how you connect with your private public keys, thank you.
Do a ls -la to verify that the permissions are good.
Then you need to specify where the private key is on the ssh client. By default they are in the same folder.
Think it generates bad the keys Iām a little lost, I attach the catches the way I try to connect and permits, if you see any mistake Iāll appreciate your feedback.
With this change you automatically connect to the dietpi user, but using the traditional method, is it normal? If I use another ssh client requests password that I guess is correct, I hope your feedback.
I understand that part, but my doubt is if it is normal to log in without specifying the key, as I show in the video or what I did wrong, thanks and greetings
Selects a file from which the identity (private key) for public
key authentication is read. The default is ~/.ssh/id_dsa,
~/.ssh/id_ecdsa, ~/.ssh/id_ecdsa_sk, ~/.ssh/id_ed25519,
~/.ssh/id_ed25519_sk and ~/.ssh/id_rsa. Identity files may also
be specified on a per-host basis in the configuration file. It
is possible to have multiple -i options (and multiple identities
specified in configuration files). If no certificates have been
explicitly specified by the CertificateFile directive, ssh will
also try to load certificate information from the filename obā
tained by appending -cert.pub to identity filenames.
So if your private key is found in there and matches, youāre good to go.
Thanks to everyone it seems to be a matter of permission and my ignorance of how the connection ssh works through private keys, greetings and thanks again