Skip to main content

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

  1. 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:

  1. 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 -
  1. 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]
  1. Switch the newly created user account:

sudo su [USER] -
  1. Import the user’s GitHub keys so they can ssh from their computer:

ssh-import-id-gh [GITHUB USERNAME]
  1. 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