How to Use Your SSH Config for Git
- Place the generated
config
file in your~/.ssh/
directory. - Set correct permissions:
chmod 600 ~/.ssh/config
- Use the Host alias in your git remote URL, e.g.
git@github-work:username/repo.git
- Each host entry can use a different SSH key for different GitHub, GitLab, Bitbucket, or private servers.
- Never share your private keys. Keep your
.ssh/config
and keys secure.
FAQs
What is an SSH config file?
The .ssh/config file lets you define settings for connecting to remote servers via SSH, including aliases, keys, and options. For git, it helps you manage multiple accounts or keys easily.
How do I use multiple SSH keys with git remotes?
Add a Host entry for each remote (e.g. github-work, github-personal) with its own IdentityFile. Use the Host alias in your git remote URL.
Is it safe to use this tool?
Yes. All config generation happens in your browser. No data is sent or stored anywhere.
What permissions should my config file have?
Set permissions to 600: chmod 600 ~/.ssh/config. This keeps your config private.