Managing Multiple SSH Keys & Git Profiles with xks
If you've ever been in a situation where your company requires you to use a different GitHub account from your personal one (or GitLab, Bitbucket, etc), with a corporate email. Or if you need to use different SSH keys to access various remote servers. Then you've likely faced the tedious task of manually managing multiple accounts or profiles on the same computer, with different SSH keys and/or different Git configurations in your .gitconfig file. Multiple GitHub accounts on the same computer? How to Configure Multiple SSH Private Keys for Different Servers Efficiently? There are both simple and advanced ways to handle this with special Git and SSH configurations, but honestly, I just wanted a quick and simple way to switch between profiles without overcomplicating things. That's why I created xks. What is xks? xks is a CLI written in Rust to switch SSH keys and/or Git profiles with a single command. It works without extra configurations, using (and only considering) the default files in Unix systems (Linux & macOS): Git File ~/.gitconfig SSH Files ~/.ssh/config ~/.ssh/id_ed25519 ~/.ssh/id_ed25519.pub ~/.ssh/id_ecdsa ~/.ssh/id_ecdsa.pub ~/.ssh/id_rsa ~/.ssh/id_rsa.pub ~/.ssh/id_dsa ~/.ssh/id_dsa.pub (Only the files that exist when saving a profile; any other custom-named SSH keys are ignored).

If you've ever been in a situation where your company requires you to use a different GitHub account from your personal one (or GitLab, Bitbucket, etc
), with a corporate email.
Or if you need to use different SSH keys to access various remote servers.
Then you've likely faced the tedious task of manually managing multiple accounts or profiles on the same computer, with different SSH keys and/or different Git configurations in your .gitconfig
file.
There are both simple and advanced ways to handle this with special Git and SSH configurations, but honestly, I just wanted a quick and simple way to switch between profiles without overcomplicating things.
That's why I created xks
.
What is xks?
xks
is a CLI written in Rust to switch SSH keys and/or Git profiles with a single command.
It works without extra configurations, using (and only considering
) the default files in Unix systems (Linux & macOS
):
Git File
~/.gitconfig
SSH Files
~/.ssh/config
~/.ssh/id_ed25519
~/.ssh/id_ed25519.pub
~/.ssh/id_ecdsa
~/.ssh/id_ecdsa.pub
~/.ssh/id_rsa
~/.ssh/id_rsa.pub
~/.ssh/id_dsa
~/.ssh/id_dsa.pub
(Only the files that exist when saving a profile; any other custom-named SSH keys are ignored).