How to use scp between two pynqs without password

I want to transfer files between two pynqs.
scp was choosed but it need password.
Considering auto operation is needed,How could we use scp in password-less?

Google shows I need to use ssh-keygen, in /root/.ssh.
But I can’t find /root/.ssh
When I type cd /root,the user changed to root.

Let’s say you’re trying to SCP a file from pynq1 to pynq2.

One way to do this is to use sshpass like this:

sshpass -p <pynq2_password> scp <file_path> pynq2@<pynq2_address>:<file_destination>

1 Like

Hi @AllenChenChao
When you run ssh-keygen it asks you for a folder. If you run the command as root you can use the default values. It will automatically create the /root/.ssh folder with public and private key.

Once you have the keys, you can copy the key from one board to another ssh-copy-id <ip second pynq board> this first time you will be asked for password, but for the following times you will not be asked for password.