-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathconfig_example
39 lines (33 loc) · 1.1 KB
/
config_example
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
# applies to all hosts and ensures our sessions stay alive
Host *
TCPKeepAlive yes
ServerAliveInterval 30
ConnectTimeout 10
############################
# other ssh config below
############################
# example configs
Host bastion.client1
Hostname bastion.client1.host.com.au
User root
Host web1.client1
Hostname web1.client1.host.com.au
User root
ProxyJump bastion1.client1
############################
# ssm-tool/ssh-over-ssm config below
############################
# applies if our executed command returns an exit code of 0.
# we use grep to check if the host is present in config generated
# by ssm-tool. if true, parse all the config; else continue.
Match exec "grep -qs '^Host.*%n' %d/.ssh/ssmtool-*"
Include ssmtool-*
# applies to all hosts matching the target hostname. most directives
# are self-explanatory. the identityfile directive is not strict and
# is included for cases where ssh-ssm.sh generates SSH keys.
Match host i-*
ProxyCommand ssh-ssm.sh %h %r
IdentityFile ~/.ssh/ssm-ssh-tmp
StrictHostKeyChecking no
PasswordAuthentication no
ChallengeResponseAuthentication no