Using ssh keys
Typing in your password when you want to log in or copy something to the PYNQ board is annoying. This can be avoided by creating a so-called ssh key, which proves to the PYNQ board that you are an authorised user that can log in without typing a password. This is especially useful when using git version management.
An ssh key is a private/public key pair. Both keys are on your laptop and the public key is on the PYNQ board.
Generating and installing an ssh key
- In a terminal on the PYNQ board execute the commands (be careful about the spaces in the second line):
- In a terminal on your laptop generate a ssh key with
ssh-keygen
and copy it to the PYNQ board. You have to enter the student password for the last two commands.
- In a terminal on your laptop add the identity file to your ssh profile by editing the
.ssh/config
file. This.ssh/config
file is the same one as you used for Visual Studio Code, which you can use to edit the file if you wish. Note that the 4 spaces beforeIdentityFile
and the capital letters (e.g.IdentityFile
notIdentityfile
) are important.
You can use Visual Studio Code, vim (in the Powershell) or any other text editor you wish.
-
On macOS only, in a terminal on your laptop add the the following line to your
.bash_profile
(if using bash),.zsh_profile
(if using zsh): -
You can now log in by using
ssh pynq
instead ofssh student@10.43.0.1
. (Similarly for scp.)
Example Windows output
Example macOS output
Connecting to a git repository (e.g. gitlab.tue.nl) from PYNQ
When using git repositories such as gitlab.tue.nl
with the PYNQ board you'll need to use ssh keys too.
For more details see the git page.