Transfering SSH keys or creating a new one

I apologize in advance for my ignorance.

Hello all,
I installed the Nextcloud snap image and set everything up. Raspberry Pi 3 and an external hard drive.

I created SSH keys on a computer that I never planned on keeping. I would like to SSH into my Nextcloud Raspberry Pi on a different computer. Can someone point me in the right direction on how to do this? Transfer the private key? Create a new key in the Ubuntu account?

I have been using every spare moment to find a solution.



@pedronis can you help with this?

I’m not sure I completely understand what the exact problem is, and I have no experience with those images.

Can the user log in locally on the RPi3 ?

To transfer your ssh keys from one desktop machine to another, you need to back up the ~/.ssh directory on the old machine, transfer that dir to your new machine and once you have it in place do the following:

chown -R $USER.$USER $HOME/.ssh
chmod 700 $HOME/.ssh
chmod 600 $HOME/.ssh/*

Then you should be able to ssh into your nextcloud Pi3 from the new machine in the same way you did on the old machine.

1 Like

I’m pretty sure I understand that. I will give it a shot today.

This is the first time logging in to something using a public and private key.

Thanks to everyone for their help.