Skip to content

Instantly share code, notes, and snippets.

@SuwakoMmh
SuwakoMmh / Gitbridge.md
Last active May 14, 2023 14:30
Using the same SSH key for multiple Github (& co) accounts

Using the same SSH key for multiple Github (& co) accounts

The most known hack is to edit ~/.ssh/config and use a different hostname in place of github.com for each account. (ref this gist)

However, one might still want to use github.com as a hostname for various reasons. Hence this hack idea I had.

1. Creating a bridge user

This may vary depending on the distribution, but for ubuntu or any given useradd :

# useradd -r -m -d /opt/git git