Skip to content

Instantly share code, notes, and snippets.

View crecabar's full-sized avatar

Cristian Recabarren crecabar

View GitHub Profile
@crecabar
crecabar / multipleSSHkeysForUnix.md
Created January 26, 2023 13:14 — forked from bonnopc/multipleSSHkeysForUnix.md
Enable Multiple SSH Keys for MacOS/ Ubuntu/ Debian etc.

Enable Multiple SSH Keys for UNIX Based OS

Follow these steps below to enable multiple SSH keys on your device with UNIX Based OS (MacOS/ Ubuntu/ Debian etc.). Suppose, you have two different users/ accounts, one is personalAccount and another is companyAccount. And you have already a default key configured with personalAccount. (If you haven't set up your default ssh-key yet, please follow this article before going ahead with these steps described below.)

1. Generate another ssh-key

Generate a new ssh-key for your companyAccount.

cd ~/.ssh
ssh-keygen -t rsa -C "your_email@youremail.com"
@crecabar
crecabar / work-with-multiple-github-accounts.md
Created March 15, 2024 19:31 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent