scp back and forth to Xilinx embedded platform

less than 1 minute read

When scp .xclbin files from the host machine to the embedded platform or scp results back to the host machine, we don’t want to type in id/password every time.

When first boot the embedded platform(ZCU102 for example), at ZCU102, vi ~/.profile,

ifconfig eth0 10.10.7.1 netmask 255.0.0.0

When ZCU102 boots, it will automatically set its ip as 10.10.7.1(an example addr).

From workstation to ZCU102(for example)

Set a neighboring ip for the workstation like 10.10.7.2. Then, at workstation, generate ~/.ssh/id_rsa_zcu102 and ~/.ssh/id_rsa_zcu102.pub In ~/.ssh/config,

Host zcu102
    HostName 10.10.7.1
    User root
    IdentityFile ~/.ssh/id_rsa_zcu102
    StrictHostKeyChecking no

Then, in ZCU102, mkdir .ssh and vi ~/.ssh/authorized_keys, add id_rsa_zcu102.pub. Finally, at workstation, try ssh zcu102 to login without typing id/password.

From ZCU102 to workstation

At ZCU102, cd ~/.ssh,

dropbearkey -f id_rsa -t rsa

to generate id_rsa. Public key is shown in terminal. Copy public key to workstation’s ~/.ssh/authorized_keys. Try ssh -i ~/.ssh/id_rsa USER_NAME@10.10.7.2.