Generating new SSH key (link)
$ ssh-keygen -t ed25519 -C "your_email@example.com"
For example:
~/.ssh/id_ed25519
~/.ssh/id_ed25519_work
Then add the keys to the ssh agent:
$ ssh-add ~/.ssh/id_ed25519
$ ssh-add ~/.ssh/id_ed25519_work
Edit the SSH config file:
$ vim ~/.ssh/config
Should be similar to the one below:
# Personal account (default config)
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519
# Work account
Host github.com-work
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_work
Cloning a new repo for your work github account:
$ git clone git@github.com-work:your-username/repo-name.git