7
|
1 " Vim syntax file
|
3224
|
2 " Language: OpenSSH client configuration file (ssh_config)
|
|
3 " Author: David Necas (Yeti)
|
|
4 " Maintainer: Leonard Ehrenfried <leonard.ehrenfried@web.de>
|
|
5 " Modified By: Thilo Six
|
|
6 " Originally: 2009-07-09
|
|
7 " Last Change: 2011 Oct 31
|
|
8 " SSH Version: 5.9p1
|
|
9 "
|
7
|
10
|
|
11 " Setup
|
|
12 if version >= 600
|
2034
|
13 if exists("b:current_syntax")
|
|
14 finish
|
|
15 endif
|
7
|
16 else
|
2034
|
17 syntax clear
|
7
|
18 endif
|
|
19
|
|
20 if version >= 600
|
2034
|
21 setlocal iskeyword=_,-,a-z,A-Z,48-57
|
7
|
22 else
|
2034
|
23 set iskeyword=_,-,a-z,A-Z,48-57
|
7
|
24 endif
|
|
25
|
3224
|
26
|
|
27 " case on
|
|
28 syn case match
|
|
29
|
7
|
30
|
|
31 " Comments
|
3224
|
32 syn match sshconfigComment "^#.*$" contains=sshconfigTodo
|
|
33 syn match sshconfigComment "\s#.*$" contains=sshconfigTodo
|
|
34
|
|
35 syn keyword sshconfigTodo TODO FIXME NOTE contained
|
|
36
|
7
|
37
|
|
38 " Constants
|
|
39 syn keyword sshconfigYesNo yes no ask
|
2034
|
40 syn keyword sshconfigYesNo any auto
|
3224
|
41 syn keyword sshconfigYesNo force autoask none
|
|
42
|
|
43 syn keyword sshconfigCipher 3des blowfish
|
|
44 syn keyword sshconfigCiphers aes128-cbc 3des-cbc blowfish blowfish-cbc cast128-cbc
|
|
45 syn keyword sshconfigCiphers aes192-cbc aes256-cbc aes128-ctr aes192-ctr aes256-ctr
|
|
46 syn keyword sshconfigCiphers arcfour arcfour128 arcfour256 cast128-cbc
|
|
47
|
7
|
48 syn keyword sshconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
|
|
49 syn keyword sshconfigMAC hmac-md5-96
|
3224
|
50 syn keyword sshconfigMAC hmac-sha2-256 hmac-sha2-256-96 hmac-sha2-512
|
|
51 syn keyword sshconfigMAC hmac-sha2-512-96
|
|
52 syn match sshconfigMAC "\<umac-64@openssh\.com\>"
|
|
53
|
7
|
54 syn keyword sshconfigHostKeyAlg ssh-rsa ssh-dss
|
3224
|
55 syn match sshconfigHostKeyAlg "\<ecdsa-sha2-nistp256-cert-v01@openssh\.com\>"
|
|
56 syn match sshconfigHostKeyAlg "\<ecdsa-sha2-nistp384-cert-v01@openssh\.com\>"
|
|
57 syn match sshconfigHostKeyAlg "\<ecdsa-sha2-nistp521-cert-v01@openssh\.com\>"
|
|
58 syn match sshconfigHostKeyAlg "\<ssh-rsa-cert-v01@openssh\.com\>"
|
|
59 syn match sshconfigHostKeyAlg "\<ssh-dss-cert-v01@openssh\.com\>"
|
|
60 syn match sshconfigHostKeyAlg "\<ssh-rsa-cert-v00@openssh\.com\>"
|
|
61 syn match sshconfigHostKeyAlg "\<ssh-dss-cert-v00@openssh\.com\>"
|
|
62 syn keyword sshconfigHostKeyAlg ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521
|
|
63
|
|
64 syn keyword sshconfigPreferredAuth hostbased publickey password gssapi-with-mic
|
7
|
65 syn keyword sshconfigPreferredAuth keyboard-interactive
|
3224
|
66
|
7
|
67 syn keyword sshconfigLogLevel QUIET FATAL ERROR INFO VERBOSE
|
|
68 syn keyword sshconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3
|
2034
|
69 syn keyword sshconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1
|
|
70 syn keyword sshconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
|
3224
|
71 syn keyword sshconfigAddressFamily inet inet6
|
|
72
|
|
73 syn match sshconfigIPQoS "af1[1234]"
|
|
74 syn match sshconfigIPQoS "af2[23]"
|
|
75 syn match sshconfigIPQoS "af3[123]"
|
|
76 syn match sshconfigIPQoS "af4[123]"
|
|
77 syn match sshconfigIPQoS "cs[0-7]"
|
|
78 syn keyword sshconfigIPQoS ef lowdelay throughput reliability
|
|
79 syn keyword sshconfigKbdInteractive bsdauth pam skey
|
|
80
|
|
81 syn keyword sshconfigKexAlgo ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521
|
|
82 syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha256
|
|
83 syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha1
|
|
84 syn keyword sshconfigKexAlgo diffie-hellman-group14-sha1
|
|
85 syn keyword sshconfigKexAlgo diffie-hellman-group1-sha1
|
|
86
|
|
87 syn keyword sshconfigTunnel point-to-point ethernet
|
|
88
|
|
89 syn match sshconfigVar "%[rhplLdun]\>"
|
7
|
90 syn match sshconfigSpecial "[*?]"
|
|
91 syn match sshconfigNumber "\d\+"
|
|
92 syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>"
|
|
93 syn match sshconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>"
|
|
94 syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>"
|
|
95
|
3224
|
96
|
|
97 " case off
|
|
98 syn case ignore
|
|
99
|
|
100
|
7
|
101 " Keywords
|
|
102 syn keyword sshconfigHostSect Host
|
3224
|
103
|
2034
|
104 syn keyword sshconfigKeyword AddressFamily
|
3224
|
105 syn keyword sshconfigKeyword BatchMode
|
|
106 syn keyword sshconfigKeyword BindAddress
|
|
107 syn keyword sshconfigKeyword ChallengeResponseAuthentication
|
|
108 syn keyword sshconfigKeyword CheckHostIP
|
|
109 syn keyword sshconfigKeyword Cipher
|
|
110 syn keyword sshconfigKeyword Ciphers
|
|
111 syn keyword sshconfigKeyword ClearAllForwardings
|
|
112 syn keyword sshconfigKeyword Compression
|
|
113 syn keyword sshconfigKeyword CompressionLevel
|
|
114 syn keyword sshconfigKeyword ConnectTimeout
|
|
115 syn keyword sshconfigKeyword ConnectionAttempts
|
|
116 syn keyword sshconfigKeyword ControlMaster
|
|
117 syn keyword sshconfigKeyword ControlPath
|
|
118 syn keyword sshconfigKeyword ControlPersist
|
|
119 syn keyword sshconfigKeyword DynamicForward
|
|
120 syn keyword sshconfigKeyword EnableSSHKeysign
|
|
121 syn keyword sshconfigKeyword EscapeChar
|
|
122 syn keyword sshconfigKeyword ExitOnForwardFailure
|
|
123 syn keyword sshconfigKeyword ForwardAgent
|
|
124 syn keyword sshconfigKeyword ForwardX11
|
|
125 syn keyword sshconfigKeyword ForwardX11Timeout
|
2034
|
126 syn keyword sshconfigKeyword ForwardX11Trusted
|
|
127 syn keyword sshconfigKeyword GSSAPIAuthentication
|
3224
|
128 syn keyword sshconfigKeyword GSSAPIClientIdentity
|
|
129 syn keyword sshconfigKeyword GSSAPIDelegateCredentials
|
|
130 syn keyword sshconfigKeyword GSSAPIKeyExchange
|
|
131 syn keyword sshconfigKeyword GSSAPIRenewalForcesRekey
|
|
132 syn keyword sshconfigKeyword GSSAPIServerIdentity
|
|
133 syn keyword sshconfigKeyword GSSAPITrustDNS
|
|
134 syn keyword sshconfigKeyword GSSAPITrustDns
|
|
135 syn keyword sshconfigKeyword GatewayPorts
|
2034
|
136 syn keyword sshconfigKeyword GlobalKnownHostsFile
|
3224
|
137 syn keyword sshconfigKeyword HashKnownHosts
|
|
138 syn keyword sshconfigKeyword HostKeyAlgorithms
|
|
139 syn keyword sshconfigKeyword HostKeyAlias
|
|
140 syn keyword sshconfigKeyword HostName
|
|
141 syn keyword sshconfigKeyword HostbasedAuthentication
|
|
142 syn keyword sshconfigKeyword IPQoS
|
|
143 syn keyword sshconfigKeyword IdentitiesOnly
|
|
144 syn keyword sshconfigKeyword IdentityFile
|
|
145 syn keyword sshconfigKeyword KbdInteractiveAuthentication
|
|
146 syn keyword sshconfigKeyword KbdInteractiveDevices
|
|
147 syn keyword sshconfigKeyword KexAlgorithms
|
|
148 syn keyword sshconfigKeyword LocalCommand
|
|
149 syn keyword sshconfigKeyword LocalForward
|
|
150 syn keyword sshconfigKeyword LogLevel
|
2034
|
151 syn keyword sshconfigKeyword MACs
|
|
152 syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost
|
|
153 syn keyword sshconfigKeyword NumberOfPasswordPrompts
|
3224
|
154 syn keyword sshconfigKeyword PKCS11Provider
|
|
155 syn keyword sshconfigKeyword PasswordAuthentication
|
2034
|
156 syn keyword sshconfigKeyword PermitLocalCommand
|
3224
|
157 syn keyword sshconfigKeyword Port
|
|
158 syn keyword sshconfigKeyword PreferredAuthentications
|
|
159 syn keyword sshconfigKeyword Protocol
|
|
160 syn keyword sshconfigKeyword ProxyCommand
|
|
161 syn keyword sshconfigKeyword PubkeyAuthentication
|
|
162 syn keyword sshconfigKeyword RSAAuthentication
|
|
163 syn keyword sshconfigKeyword RekeyLimit
|
|
164 syn keyword sshconfigKeyword RemoteForward
|
|
165 syn keyword sshconfigKeyword RequestTTY
|
2034
|
166 syn keyword sshconfigKeyword RhostsRSAAuthentication
|
3224
|
167 syn keyword sshconfigKeyword SendEnv
|
|
168 syn keyword sshconfigKeyword ServerAliveCountMax
|
|
169 syn keyword sshconfigKeyword ServerAliveInterval
|
|
170 syn keyword sshconfigKeyword SmartcardDevice
|
|
171 syn keyword sshconfigKeyword StrictHostKeyChecking
|
|
172 syn keyword sshconfigKeyword TCPKeepAlive
|
|
173 syn keyword sshconfigKeyword Tunnel
|
|
174 syn keyword sshconfigKeyword TunnelDevice
|
|
175 syn keyword sshconfigKeyword UseBlacklistedKeys
|
|
176 syn keyword sshconfigKeyword UsePrivilegedPort
|
|
177 syn keyword sshconfigKeyword User
|
2034
|
178 syn keyword sshconfigKeyword UserKnownHostsFile
|
3224
|
179 syn keyword sshconfigKeyword VerifyHostKeyDNS
|
|
180 syn keyword sshconfigKeyword VisualHostKey
|
2034
|
181 syn keyword sshconfigKeyword XAuthLocation
|
7
|
182
|
|
183 " Define the default highlighting
|
|
184 if version >= 508 || !exists("did_sshconfig_syntax_inits")
|
2034
|
185 if version < 508
|
|
186 let did_sshconfig_syntax_inits = 1
|
|
187 command -nargs=+ HiLink hi link <args>
|
|
188 else
|
|
189 command -nargs=+ HiLink hi def link <args>
|
|
190 endif
|
7
|
191
|
2034
|
192 HiLink sshconfigComment Comment
|
|
193 HiLink sshconfigTodo Todo
|
|
194 HiLink sshconfigHostPort sshconfigConstant
|
|
195 HiLink sshconfigNumber sshconfigConstant
|
|
196 HiLink sshconfigConstant Constant
|
|
197 HiLink sshconfigYesNo sshconfigEnum
|
|
198 HiLink sshconfigCipher sshconfigEnum
|
3224
|
199 HiLink sshconfigCiphers sshconfigEnum
|
2034
|
200 HiLink sshconfigMAC sshconfigEnum
|
|
201 HiLink sshconfigHostKeyAlg sshconfigEnum
|
|
202 HiLink sshconfigLogLevel sshconfigEnum
|
|
203 HiLink sshconfigSysLogFacility sshconfigEnum
|
3224
|
204 HiLink sshconfigAddressFamily sshconfigEnum
|
|
205 HiLink sshconfigIPQoS sshconfigEnum
|
|
206 HiLink sshconfigKbdInteractive sshconfigEnum
|
|
207 HiLink sshconfigKexAlgo sshconfigEnum
|
|
208 HiLink sshconfigTunnel sshconfigEnum
|
2034
|
209 HiLink sshconfigPreferredAuth sshconfigEnum
|
|
210 HiLink sshconfigVar sshconfigEnum
|
|
211 HiLink sshconfigEnum Identifier
|
|
212 HiLink sshconfigSpecial Special
|
|
213 HiLink sshconfigKeyword Keyword
|
|
214 HiLink sshconfigHostSect Type
|
|
215 delcommand HiLink
|
7
|
216 endif
|
|
217
|
|
218 let b:current_syntax = "sshconfig"
|
3224
|
219
|
|
220 " vim:set ts=8 sw=2 sts=2:
|