![]() The number of lines should match the number of keys displayed. On the remote machine that is rejecting the attempt at key-based, double-check the /.ssh/authorizedkeys file. You will need to set the permissions manually. Usually ssh-copy-id is a more reliable way to transfer the keys over to the remote machines. ![]() If the keys are installed by the normal process ssh-copy-id this would be performed. rw permission for user caetano and read access for public keys but no access by others. If you just edited /etc/ssh/sshdconfig, run sudo systemctl reload sshd for the changes to take effect. If you login with password, makr sure PasswordAuthentication yes. If you login as root, make sure PermitRootLogin yes. The error message has the fix - key files should only be readable by the user i.e. sudo nano /etc/ssh/sshdconfig Make sure AllowUsers USERNAME is available for your username. There is nothing to stop you having multiple private keys - I have several for different purposes, but use the same key on all my Pi. You should copy the private key to any of your computers you want to connect from. My keys have been installed on my 9 Pi and all the other computers I use on my local network for ssh & ftp access You can (and should) copy the public key to ~/.ssh/authorized_keys on any computer you trust. You say "I understand that simply copying these files to a new computer would not be very secure" - I don't know where you got this idea. Load key "/Users/caetano/.ssh/id_rsa": bad permissions Your local machine has too many keys Lets run through the troubleshooting process to determine whats creating your ssh permission denied error and solve the root cause: Run ssh -vvv for more info You can save a lot of time by determining why you cant connect before you proceed. It is required that your private key files are NOT accessible by others. When I try to connect to my raspberry pi, running Debian, I get the following WARNING: UNPROTECTED PRIVATE KEY FILE! 0644 for '/Users/caetano/.ssh/id_rsa' are too open. I now have a new MacBook, where I copied the files to the. To be more detailed about the steps I took and the error I'm getting, what I did was generation the keys on my old MacBook, and saved a backup of the d_rsa and id_rsa.pub files. I understand that simply copying these files to a new computer would not be very secure if this worked, but if my raspberry was not a physical device, but instead a cloud server, would I not be able to connect anymore? Everything would be lost? Can't I recover my access using the old keys and the passphrase? What is the good practice here? Always have a login authentication? The computer where I generated the ssh key doesn't work anymore, but I have backups of the id_rsa and id_rsa.pub files. Where USER is the username on the remote server and SERVER is the address of the. This is done with the command: ssh-copy-id USERSERVER. I have a raspberry pi, with authentication off, and a ssh key with passphrase. The next step is to copy the key to the remote server.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |