2.0 Import SSH keys (on Debian Linux)
*Any confusion on command syntax/structure can be clarified in Legend
Importing Personal SSH Keys
Applicable to Personal / Home Lab setup
-
Import the user’s GitHub keys so they can ssh from their computer:
-
If any new SSH keys from other devices are added, this command needs to be done again
-
ssh-import-id-gh [GITHUB USERNAME]
Importing Other User's SSH Keys
Applicable to the Raspberry Pi Club servers - allowing other trusted users ssh access to a system requires more steps:
-
In the sys-admin’s shell, ssh into the system (e.g. node, VM, etc.) you want to give access to, and then escalate to superuser:
sudo su -
-
Create the new user and then add them to sudoers group:
- Set an easy temporary password for the user (e.g. password)
adduser [USER]
usermod -aG sudo [USER]
-
Switch the newly created user account:
sudo su [USER] -
-
Import the user’s GitHub keys so they can ssh from their computer:
ssh-import-id-gh [GITHUB USERNAME]
-
Have user ssh into the system and change their password into something secure:
- If any new SSH keys from other devices are added, this command needs to be done again
passwd
Last Updated: 2/22/2025
Contributors: Lilian, Vivian