Skip to content

Instantly share code, notes, and snippets.

@moshiurse
Created August 13, 2024 18:19
Show Gist options
  • Save moshiurse/c4686c495326c0cea451bec60a773665 to your computer and use it in GitHub Desktop.
Save moshiurse/c4686c495326c0cea451bec60a773665 to your computer and use it in GitHub Desktop.
Multiple Github/Bitbucket SSH Problem solution

Create Multiple ssh file with diffrent name first

You need to have ~/.ssh/config file

if not file found create

touch ~/.ssh/config

Inside file

# Default GitHub user
Host github.com
    HostName github.com
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/personalid

# Work user account
Host bitbucket.org
    HostName bitbucket.org
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/workid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment