-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2548 from amazeeio/justinlevi-patch-1
Documentation: Handling Multiple SSH Keys
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,3 +64,16 @@ ssh -p 32222 -t [email protected] service=nginx co | |
|
||
This will execute `whoami` within the `cli` container. | ||
|
||
## Multiple SSH Keys | ||
|
||
If you have multiple SSH keys, you can specify which key to use for a given domain by setting this in your `~/.ssh/config` file. | ||
|
||
~/.ssh/.config | ||
``` | ||
Host * | ||
AddKeysToAgent yes | ||
UseKeychain yes | ||
IdentityFile ~/.ssh/[YOUR-DEFAULT-PRIVATE-KEY] | ||
Host ssh.lagoon.amazeeio.cloud | ||
IdentityFile ~/.ssh/[YOUR-PRIVATE-KEY-FOR-USE-ON-LAGOON] | ||
``` |