SSH config examples
SSH config examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
vim ~/.ssh/config
...
Host git-codecommit.*.amazonaws.com
User A...SVRJMWFPY
IdentityFile ~/.ssh/kops-aws
Host 1.2.3.4
HostName 1.2.3.4
ForwardAgent yes
User ec2-user
AddKeysToAgent yes
IdentityFile ~/Downloads/cert-developer.pem
# Example with JUMP server
Host e2-bastion 11.22.33.44
HostName 11.22.33.44
ForwardAgent yes
User ec2-user
AddKeysToAgent yes
IdentitiesOnly yes
IdentityFile ~/.ssh/bastion.id_rsa
Host final-server 44.55.66.77
HostName 44.55.66.77
ForwardAgent yes
User ec2-user
Port 22
AddKeysToAgent yes
IdentitiesOnly yes
IdentityFile ~/.ssh/bastion.id_rsa
ProxyCommand ssh -q -W %h:%p e2-bastion
# linuxinuse account
Host gitlab.websupport.sk
HostName gitlab.websupport.sk
User git
IdentitiesOnly yes
IdentityFile ~/.ssh/websupport-ssh
...
:wq!
This post is licensed under CC BY 4.0 by the author.
