~/.ssh/
├── id_ed25519_homelab
├── id_ed25519_homelab.pub
├── id_ed25519_hetzner
├── id_ed25519_hetzner.pub
├── id_ed25519_github
├── id_ed25519_github.pub
├── config
~/.ssh/
├── id_ed25519_homelab
├── id_ed25519_homelab.pub
├── id_ed25519_hetzner
├── id_ed25519_hetzner.pub
├── id_ed25519_github
├── id_ed25519_github.pub
├── config
~/.ssh/
├── id_ed25519_homelab
├── id_ed25519_homelab.pub
├── id_ed25519_hetzner
├── id_ed25519_hetzner.pub
├── id_ed25519_github
├── id_ed25519_github.pub
├── config
ssh-keygen -t ed25519 -C "docker-01" -f ~/.ssh/id_ed25519_docker_01
ssh-keygen -t ed25519 -C "pve-1" -f ~/.ssh/id_ed25519_pve_1
ssh-keygen -t ed25519 -C "hetzner" -f ~/.ssh/id_ed25519_hetzner_example
ssh-keygen -t ed25519 -C "github" -f ~/.ssh/id_ed25519_github_example
ssh-keygen -t ed25519 -C "docker-01" -f ~/.ssh/id_ed25519_docker_01
ssh-keygen -t ed25519 -C "pve-1" -f ~/.ssh/id_ed25519_pve_1
ssh-keygen -t ed25519 -C "hetzner" -f ~/.ssh/id_ed25519_hetzner_example
ssh-keygen -t ed25519 -C "github" -f ~/.ssh/id_ed25519_github_example
ssh-keygen -t ed25519 -C "docker-01" -f ~/.ssh/id_ed25519_docker_01
ssh-keygen -t ed25519 -C "pve-1" -f ~/.ssh/id_ed25519_pve_1
ssh-keygen -t ed25519 -C "hetzner" -f ~/.ssh/id_ed25519_hetzner_example
ssh-keygen -t ed25519 -C "github" -f ~/.ssh/id_ed25519_github_example
ssh-copy-id -i ~/.ssh/id_ed25519_docker_01.pub [email protected]
ssh-copy-id -i ~/.ssh/id_ed25519_pve_1.pub [email protected]
ssh-copy-id -i ~/.ssh/id_ed25519_hetzner.pub root@your-vps-ip
ssh-copy-id -i ~/.ssh/id_ed25519_docker_01.pub [email protected]
ssh-copy-id -i ~/.ssh/id_ed25519_pve_1.pub [email protected]
ssh-copy-id -i ~/.ssh/id_ed25519_hetzner.pub root@your-vps-ip
ssh-copy-id -i ~/.ssh/id_ed25519_docker_01.pub [email protected]
ssh-copy-id -i ~/.ssh/id_ed25519_pve_1.pub [email protected]
ssh-copy-id -i ~/.ssh/id_ed25519_hetzner.pub root@your-vps-ip
vim ~/.ssh/config
vim ~/.ssh/config
vim ~/.ssh/config
# Docker server
Host docker-01 HostName 10.xx.xx.xx User myuser IdentityFile ~/.ssh/id_ed25519_docker_01 # Proxmox node
Host pve-1 HostName 10.xx.xx.xx User root IdentityFile ~/.ssh/id_ed25519_pve_1 # Hetzner VPS
Host hetzner HostName 65.21.xx.xx User root IdentityFile ~/.ssh/id_ed25519_hetzner # GitHub
Host github.com HostName github.com User git IdentityFile ~/.ssh/id_ed25519_github IdentitiesOnly yes
# Docker server
Host docker-01 HostName 10.xx.xx.xx User myuser IdentityFile ~/.ssh/id_ed25519_docker_01 # Proxmox node
Host pve-1 HostName 10.xx.xx.xx User root IdentityFile ~/.ssh/id_ed25519_pve_1 # Hetzner VPS
Host hetzner HostName 65.21.xx.xx User root IdentityFile ~/.ssh/id_ed25519_hetzner # GitHub
Host github.com HostName github.com User git IdentityFile ~/.ssh/id_ed25519_github IdentitiesOnly yes
# Docker server
Host docker-01 HostName 10.xx.xx.xx User myuser IdentityFile ~/.ssh/id_ed25519_docker_01 # Proxmox node
Host pve-1 HostName 10.xx.xx.xx User root IdentityFile ~/.ssh/id_ed25519_pve_1 # Hetzner VPS
Host hetzner HostName 65.21.xx.xx User root IdentityFile ~/.ssh/id_ed25519_hetzner # GitHub
Host github.com HostName github.com User git IdentityFile ~/.ssh/id_ed25519_github IdentitiesOnly yes
pbcopy < ~/.ssh/id_ed25519_github.pub
pbcopy < ~/.ssh/id_ed25519_github.pub
pbcopy < ~/.ssh/id_ed25519_github.pub
xclip -sel clip < ~/.ssh/id_ed25519_github.pub
# or wl-copy < ~/.ssh/id_ed25519_github.pub
xclip -sel clip < ~/.ssh/id_ed25519_github.pub
# or wl-copy < ~/.ssh/id_ed25519_github.pub
xclip -sel clip < ~/.ssh/id_ed25519_github.pub
# or wl-copy < ~/.ssh/id_ed25519_github.pub
ssh docker-01
ssh pve-1
ssh hetzner
ssh docker-01
ssh pve-1
ssh hetzner
ssh docker-01
ssh pve-1
ssh hetzner
ssh -T [email protected]
ssh -T [email protected]
ssh -T [email protected]
Hi kjetil! You've successfully authenticated, but GitHub does not provide shell access.
Hi kjetil! You've successfully authenticated, but GitHub does not provide shell access.
Hi kjetil! You've successfully authenticated, but GitHub does not provide shell access.
sudo visudo
sudo visudo
sudo visudo
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) NOPASSWD: ALL - Visit GitHub SSH settings
- Click “New SSH key”
- Give it a meaningful name
- Paste the key
- Click “Add SSH key”