7
|
1 " Vim syntax file
|
3224
|
2 " Language: OpenSSH server configuration file (sshd_config)
|
|
3 " Maintainer: 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 sshdconfigComment "^#.*$" contains=sshdconfigTodo
|
|
33 syn match sshdconfigComment "\s#.*$" contains=sshdconfigTodo
|
|
34
|
|
35 syn keyword sshdconfigTodo TODO FIXME NOTE contained
|
7
|
36
|
|
37 " Constants
|
2034
|
38 syn keyword sshdconfigYesNo yes no none
|
3224
|
39
|
2034
|
40 syn keyword sshdconfigAddressFamily any inet inet6
|
3224
|
41
|
7
|
42 syn keyword sshdconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
|
3224
|
43 syn keyword sshdconfigCipher aes192-cbc aes256-cbc aes128-ctr aes192-ctr aes256-ctr
|
714
|
44 syn keyword sshdconfigCipher arcfour arcfour128 arcfour256 cast128-cbc
|
3224
|
45
|
7
|
46 syn keyword sshdconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
|
|
47 syn keyword sshdconfigMAC hmac-md5-96
|
3224
|
48 syn keyword sshdconfigMAC hmac-sha2-256 hmac-sha256-96 hmac-sha2-512
|
|
49 syn keyword sshdconfigMAC hmac-sha2-512-96
|
|
50 syn match sshdconfigMAC "\<umac-64@openssh\.com\>"
|
|
51
|
7
|
52 syn keyword sshdconfigRootLogin without-password forced-commands-only
|
3224
|
53
|
7
|
54 syn keyword sshdconfigLogLevel QUIET FATAL ERROR INFO VERBOSE
|
|
55 syn keyword sshdconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3
|
2034
|
56 syn keyword sshdconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1
|
|
57 syn keyword sshdconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
|
3224
|
58
|
|
59 syn keyword sshdconfigCompression delayed
|
|
60
|
|
61 syn match sshdconfigIPQoS "af1[1234]"
|
|
62 syn match sshdconfigIPQoS "af2[23]"
|
|
63 syn match sshdconfigIPQoS "af3[123]"
|
|
64 syn match sshdconfigIPQoS "af4[123]"
|
|
65 syn match sshdconfigIPQoS "cs[0-7]"
|
|
66 syn keyword sshdconfigIPQoS ef lowdelay throughput reliability
|
|
67
|
|
68 syn keyword sshdconfigKexAlgo ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521
|
|
69 syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha256
|
|
70 syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha1
|
|
71 syn keyword sshdconfigKexAlgo diffie-hellman-group14-sha1
|
|
72 syn keyword sshdconfigKexAlgo diffie-hellman-group1-sha1
|
|
73
|
|
74 syn keyword sshdconfigTunnel point-to-point ethernet
|
|
75
|
|
76 syn keyword sshdconfigSubsystem internal-sftp
|
|
77
|
|
78 syn match sshdconfigVar "%[hu]\>"
|
|
79 syn match sshdconfigVar "%%"
|
|
80
|
7
|
81 syn match sshdconfigSpecial "[*?]"
|
3224
|
82
|
7
|
83 syn match sshdconfigNumber "\d\+"
|
|
84 syn match sshdconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>"
|
|
85 syn match sshdconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>"
|
2034
|
86 " FIXME: this matches quite a few things which are NOT valid IPv6 addresses
|
7
|
87 syn match sshdconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}:\d\+\>"
|
|
88 syn match sshdconfigTime "\<\(\d\+[sSmMhHdDwW]\)\+\>"
|
|
89
|
3224
|
90
|
|
91 " case off
|
|
92 syn case ignore
|
|
93
|
|
94
|
7
|
95 " Keywords
|
2034
|
96 syn keyword sshdconfigMatch Host User Group Address
|
3224
|
97
|
|
98 syn keyword sshdconfigKeyword AcceptEnv
|
|
99 syn keyword sshdconfigKeyword AddressFamily
|
|
100 syn keyword sshdconfigKeyword AllowAgentForwarding
|
|
101 syn keyword sshdconfigKeyword AllowGroups
|
|
102 syn keyword sshdconfigKeyword AllowTcpForwarding
|
|
103 syn keyword sshdconfigKeyword AllowUsers
|
|
104 syn keyword sshdconfigKeyword AuthorizedKeysFile
|
|
105 syn keyword sshdconfigKeyword AuthorizedPrincipalsFile
|
2034
|
106 syn keyword sshdconfigKeyword Banner
|
3224
|
107 syn keyword sshdconfigKeyword ChallengeResponseAuthentication
|
|
108 syn keyword sshdconfigKeyword ChrootDirectory
|
|
109 syn keyword sshdconfigKeyword Ciphers
|
|
110 syn keyword sshdconfigKeyword ClientAliveCountMax
|
|
111 syn keyword sshdconfigKeyword ClientAliveInterval
|
|
112 syn keyword sshdconfigKeyword Compression
|
|
113 syn keyword sshdconfigKeyword DebianBanner
|
|
114 syn keyword sshdconfigKeyword DenyGroups
|
|
115 syn keyword sshdconfigKeyword DenyUsers
|
2034
|
116 syn keyword sshdconfigKeyword ForceCommand
|
3224
|
117 syn keyword sshdconfigKeyword GSSAPIAuthentication
|
2034
|
118 syn keyword sshdconfigKeyword GSSAPICleanupCredentials
|
3224
|
119 syn keyword sshdconfigKeyword GSSAPIKeyExchange
|
|
120 syn keyword sshdconfigKeyword GSSAPIStoreCredentialsOnRekey
|
|
121 syn keyword sshdconfigKeyword GSSAPIStrictAcceptorCheck
|
|
122 syn keyword sshdconfigKeyword GatewayPorts
|
|
123 syn keyword sshdconfigKeyword HostCertificate
|
|
124 syn keyword sshdconfigKeyword HostKey
|
|
125 syn keyword sshdconfigKeyword HostbasedAuthentication
|
|
126 syn keyword sshdconfigKeyword HostbasedUsesNameFromPacketOnly
|
|
127 syn keyword sshdconfigKeyword IPQoS
|
|
128 syn keyword sshdconfigKeyword IgnoreRhosts
|
|
129 syn keyword sshdconfigKeyword IgnoreUserKnownHosts
|
|
130 syn keyword sshdconfigKeyword KbdInteractiveAuthentication
|
|
131 syn keyword sshdconfigKeyword KerberosAuthentication
|
|
132 syn keyword sshdconfigKeyword KerberosGetAFSToken
|
|
133 syn keyword sshdconfigKeyword KerberosOrLocalPasswd
|
|
134 syn keyword sshdconfigKeyword KerberosTicketCleanup
|
|
135 syn keyword sshdconfigKeyword KexAlgorithms
|
2034
|
136 syn keyword sshdconfigKeyword KeyRegenerationInterval
|
3224
|
137 syn keyword sshdconfigKeyword ListenAddress
|
|
138 syn keyword sshdconfigKeyword LogLevel
|
|
139 syn keyword sshdconfigKeyword LoginGraceTime
|
|
140 syn keyword sshdconfigKeyword MACs
|
|
141 syn keyword sshdconfigKeyword Match
|
|
142 syn keyword sshdconfigKeyword MaxAuthTries
|
|
143 syn keyword sshdconfigKeyword MaxSessions
|
|
144 syn keyword sshdconfigKeyword MaxStartups
|
|
145 syn keyword sshdconfigKeyword PasswordAuthentication
|
|
146 syn keyword sshdconfigKeyword PermitBlacklistedKeys
|
|
147 syn keyword sshdconfigKeyword PermitEmptyPasswords
|
|
148 syn keyword sshdconfigKeyword PermitOpen
|
|
149 syn keyword sshdconfigKeyword PermitRootLogin
|
|
150 syn keyword sshdconfigKeyword PermitTunnel
|
|
151 syn keyword sshdconfigKeyword PermitUserEnvironment
|
|
152 syn keyword sshdconfigKeyword PidFile
|
|
153 syn keyword sshdconfigKeyword Port
|
|
154 syn keyword sshdconfigKeyword PrintLastLog
|
|
155 syn keyword sshdconfigKeyword PrintMotd
|
|
156 syn keyword sshdconfigKeyword Protocol
|
2034
|
157 syn keyword sshdconfigKeyword PubkeyAuthentication
|
3224
|
158 syn keyword sshdconfigKeyword RSAAuthentication
|
|
159 syn keyword sshdconfigKeyword RevokedKeys
|
|
160 syn keyword sshdconfigKeyword RhostsRSAAuthentication
|
|
161 syn keyword sshdconfigKeyword ServerKeyBits
|
|
162 syn keyword sshdconfigKeyword ShowPatchLevel
|
|
163 syn keyword sshdconfigKeyword StrictModes
|
|
164 syn keyword sshdconfigKeyword Subsystem
|
|
165 syn keyword sshdconfigKeyword SyslogFacility
|
2034
|
166 syn keyword sshdconfigKeyword TCPKeepAlive
|
3224
|
167 syn keyword sshdconfigKeyword TrustedUserCAKeys
|
|
168 syn keyword sshdconfigKeyword UseDNS
|
|
169 syn keyword sshdconfigKeyword UseLogin
|
|
170 syn keyword sshdconfigKeyword UsePAM
|
|
171 syn keyword sshdconfigKeyword UsePrivilegeSeparation
|
|
172 syn keyword sshdconfigKeyword X11DisplayOffset
|
|
173 syn keyword sshdconfigKeyword X11Forwarding
|
|
174 syn keyword sshdconfigKeyword X11UseLocalhost
|
|
175 syn keyword sshdconfigKeyword XAuthLocation
|
|
176
|
7
|
177
|
|
178 " Define the default highlighting
|
|
179 if version >= 508 || !exists("did_sshdconfig_syntax_inits")
|
2034
|
180 if version < 508
|
|
181 let did_sshdconfig_syntax_inits = 1
|
|
182 command -nargs=+ HiLink hi link <args>
|
|
183 else
|
|
184 command -nargs=+ HiLink hi def link <args>
|
|
185 endif
|
7
|
186
|
2034
|
187 HiLink sshdconfigComment Comment
|
|
188 HiLink sshdconfigTodo Todo
|
|
189 HiLink sshdconfigHostPort sshdconfigConstant
|
|
190 HiLink sshdconfigTime sshdconfigConstant
|
|
191 HiLink sshdconfigNumber sshdconfigConstant
|
|
192 HiLink sshdconfigConstant Constant
|
|
193 HiLink sshdconfigYesNo sshdconfigEnum
|
|
194 HiLink sshdconfigAddressFamily sshdconfigEnum
|
|
195 HiLink sshdconfigCipher sshdconfigEnum
|
|
196 HiLink sshdconfigMAC sshdconfigEnum
|
|
197 HiLink sshdconfigRootLogin sshdconfigEnum
|
|
198 HiLink sshdconfigLogLevel sshdconfigEnum
|
|
199 HiLink sshdconfigSysLogFacility sshdconfigEnum
|
3224
|
200 HiLink sshdconfigVar sshdconfigEnum
|
|
201 HiLink sshdconfigCompression sshdconfigEnum
|
|
202 HiLink sshdconfigIPQoS sshdconfigEnum
|
|
203 HiLink sshdconfigKexAlgo sshdconfigEnum
|
|
204 HiLink sshdconfigTunnel sshdconfigEnum
|
|
205 HiLink sshdconfigSubsystem sshdconfigEnum
|
2034
|
206 HiLink sshdconfigEnum Function
|
|
207 HiLink sshdconfigSpecial Special
|
|
208 HiLink sshdconfigKeyword Keyword
|
|
209 HiLink sshdconfigMatch Type
|
|
210 delcommand HiLink
|
7
|
211 endif
|
|
212
|
|
213 let b:current_syntax = "sshdconfig"
|
3224
|
214
|
|
215 " vim:set ts=8 sw=2 sts=2:
|