![ssh copy id permission denied ssh copy id permission denied](https://zhiliao.h3c.com/uploads/t/20200228/15828622972694.jpg)
You will need to set the permissions manually. 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. cat /.ssh/idrsa.pub or sudo apt-get install xclip xclip -sel clip < /.ssh/idrsa.pub Copy/Install local public key to remote server ssh-copy-id USERNAMESERVERIP or ssh-copy-id -i KEYFILENAME ln-userSERVERIP NOTE: ssh-copy-id ssh-copy-id installs an SSH key on a server as an authorized key. If the keys are installed by the normal process ssh-copy-id this would be performed.
![ssh copy id permission denied ssh copy id permission denied](https://miro.medium.com/max/1104/1*eFDw-hj0VkBS2tY-dNLWrA.png)
rw permission for user caetano and read access for public keys but no access by others. The error message has the fix - key files should only be readable by the user i.e.
![ssh copy id permission denied ssh copy id permission denied](https://3.bp.blogspot.com/-AHzOfWGkpNQ/XIFuEJsegVI/AAAAAAAAKjI/aIai0g9k5_sr5QyevZvSeTaq09jc2YLBgCLcBGAs/s1600/AddSSHKey.png)
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 It is required that your private key files are NOT accessible by others. ssh-keygen -R hostname or vim /.ssh/knownhosts. Delete that particular host from knowhosts file using editor or command as follows. Sometime, there may be issue due to old or incorrect host key. 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. Solution 9 :- Try removing your host entry from 'knownhosts' file. 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. I have a raspberry pi, with authentication off, and a ssh key with passphrase.