I was cloning a Git repository and I had copied my id_rsa key from another PC to my /home/me/.ssh/ on Ubuntu 12.04, however this error shows up:
Permission denied (publickey,gssapi-with-mic).
How would I solve this issue?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
You shouldn't just copy the key around. Create a new key for the machine you are using in the same way as you created the one you are copying. According to this page, you should do:
Create the key
ssh-keygen -t dsa
Copy the content of id_dsa.pub file and append it to the target machine's
.ssh/authorized_keys file. If authorized_keys file is not accessible, then just create
.ssh/authorized_keys2 file and paste the key.
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
Copy the key to the target machine
ssh-agent sh -c 'ssh-add < /dev/null && bash'