robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

robinmerge: 1dc9728daa1d8a2702

master
13.7 KiB315 linesraw
1" Vim syntax file
2" Language:	OpenSSH server configuration file (sshd_config)
3" Author:	David Necas (Yeti)
4" Maintainer:	Jakub Jelen <jakuje at gmail dot com>
5" Previous Maintainer:	Dominik Fischer <d dot f dot fischer at web dot de>
6" Contributor:	Thilo Six
7" Contributor:  Leonard Ehrenfried <leonard.ehrenfried@web.de>
8" Contributor:  Karsten Hopp <karsten@redhat.com>
9" Contributor:  Fionn Fitzmaurice (github.com/fionn)
10" Originally:	2009-07-09
11" Last Change:	2026 Mar 11
12" 2026 Sep 27 by Vim project: update secure keywords #21376
13" 2026 Sep 27 by Vim project: fix typo #21390
14" 2026 Sep 28 by Vim project: update syntax file #21387
15" SSH Version:	10.1p1
16"
17
18" Setup
19" quit when a syntax file was already loaded
20if exists("b:current_syntax")
21  finish
22endif
23
24syn iskeyword _,-,a-z,A-Z,48-57
25
26
27" case on
28syn case match
29
30
31" Comments
32syn match sshdconfigComment "^#.*$" contains=sshdconfigTodo
33syn match sshdconfigComment "\s#.*$" contains=sshdconfigTodo
34
35syn keyword sshdconfigTodo TODO FIXME NOTE contained
36
37" Constants
38syn keyword sshdconfigYesNo yes no none
39
40syn keyword sshdconfigAddressFamily any inet inet6
41
42syn keyword sshdconfigPrivilegeSeparation sandbox
43
44syn keyword sshdconfigTcpForwarding local remote
45
46syn keyword sshdconfigRootLogin prohibit-password without-password forced-commands-only
47
48syn keyword sshdconfigPubkeyAuthOptions touch-required verify-required
49
50syn keyword sshdconfigCiphers 3des-cbc
51syn keyword sshdconfigCiphersDeprecated blowfish-cbc cast128-cbc arcfour arcfour128 arcfour256
52syn keyword sshdconfigCiphers aes128-cbc
53syn keyword sshdconfigCiphers aes192-cbc
54syn keyword sshdconfigCiphers aes256-cbc
55syn match   sshdconfigCiphersDeprecated "\<rijndael-cbc@lysator\.liu\.se\>"
56syn keyword sshdconfigCiphers aes128-ctr
57syn keyword sshdconfigCiphers aes192-ctr
58syn keyword sshdconfigCiphers aes256-ctr
59syn match   sshdconfigCiphers "\<aes128-gcm@openssh\.com\>"
60syn match   sshdconfigCiphers "\<aes256-gcm@openssh\.com\>"
61syn match   sshdconfigCiphers "\<chacha20-poly1305@openssh\.com\>"
62
63syn keyword sshdconfigMAC hmac-sha1
64syn keyword sshdconfigMAC hmac-sha1-96
65syn keyword sshdconfigMAC hmac-sha2-256
66syn keyword sshdconfigMAC hmac-sha2-512
67syn keyword sshdconfigMAC hmac-md5
68syn keyword sshdconfigMAC hmac-md5-96
69syn match   sshdconfigMACDeprecated "\<hmac-ripemd160\%(@openssh\.com\)\?\>"
70syn match   sshdconfigMAC "\<umac-64@openssh\.com\>"
71syn match   sshdconfigMAC "\<umac-128@openssh\.com\>"
72syn match   sshdconfigMAC "\<hmac-sha1-etm@openssh\.com\>"
73syn match   sshdconfigMAC "\<hmac-sha1-96-etm@openssh\.com\>"
74syn match   sshdconfigMAC "\<hmac-sha2-256-etm@openssh\.com\>"
75syn match   sshdconfigMAC "\<hmac-sha2-512-etm@openssh\.com\>"
76syn match   sshdconfigMAC "\<hmac-md5-etm@openssh\.com\>"
77syn match   sshdconfigMAC "\<hmac-md5-96-etm@openssh\.com\>"
78syn match   sshdconfigMACDeprecated "\<hmac-ripemd160-etm@openssh\.com\>"
79syn match   sshdconfigMAC "\<umac-64-etm@openssh\.com\>"
80syn match   sshdconfigMAC "\<umac-128-etm@openssh\.com\>"
81
82syn keyword sshdconfigHostKeyAlgo ssh-mldsa44-ed25519
83syn keyword sshdconfigHostKeyAlgo ssh-mldsa44-ed25519-cert
84syn keyword sshdconfigHostKeyAlgo ssh-ed25519
85syn match sshdconfigHostKeyAlgo "\<ssh-ed25519-cert-v01@openssh\.com\>"
86syn match sshdconfigHostKeyAlgo "\<sk-ssh-ed25519@openssh\.com\>"
87syn match sshdconfigHostKeyAlgo "\<sk-ssh-ed25519-cert-v01@openssh\.com\>"
88syn keyword sshdconfigHostKeyAlgo ssh-rsa
89syn keyword sshdconfigHostKeyAlgo rsa-sha2-256
90syn keyword sshdconfigHostKeyAlgo rsa-sha2-512
91syn keyword sshdconfigHostKeyAlgoDeprecated ssh-dss
92syn keyword sshdconfigHostKeyAlgo ecdsa-sha2-nistp256
93syn keyword sshdconfigHostKeyAlgo ecdsa-sha2-nistp384
94syn keyword sshdconfigHostKeyAlgo ecdsa-sha2-nistp521
95syn match sshdconfigHostKeyAlgo "\<ssh-rsa-cert-v01@openssh\.com\>"
96syn match sshdconfigHostKeyAlgo "\<rsa-sha2-256-cert-v01@openssh\.com\>"
97syn match sshdconfigHostKeyAlgo "\<rsa-sha2-512-cert-v01@openssh\.com\>"
98syn match sshdconfigHostKeyAlgoDeprecated "\<ssh-dss-cert-v01@openssh\.com\>"
99syn match sshdconfigHostKeyAlgo "\<ecdsa-sha2-nistp256-cert-v01@openssh\.com\>"
100syn match sshdconfigHostKeyAlgo "\<ecdsa-sha2-nistp384-cert-v01@openssh\.com\>"
101syn match sshdconfigHostKeyAlgo "\<ecdsa-sha2-nistp521-cert-v01@openssh\.com\>"
102syn match sshdconfigHostKeyAlgo "\<\%(webauthn-\)\?sk-ecdsa-sha2-nistp256@openssh\.com\>"
103syn match sshdconfigHostKeyAlgo "\<\%(webauthn-\)\?sk-ecdsa-sha2-nistp256-cert-v01@openssh\.com\>"
104
105syn keyword sshdconfigRootLogin prohibit-password without-password forced-commands-only
106
107syn keyword sshdconfigLogLevel QUIET FATAL ERROR INFO VERBOSE
108syn keyword sshdconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3
109syn keyword sshdconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1
110syn keyword sshdconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
111
112syn keyword sshdconfigCompression    delayed
113
114syn match   sshdconfigIPQoS	"\<af[1-4][1-3]\>"
115syn match   sshdconfigIPQoS	"\<cs[0-7]\>"
116syn keyword sshdconfigIPQoS	ef le
117syn keyword sshdconfigIPQoSDeprecated	lowdelay throughput reliability
118
119syn keyword sshdconfigKexAlgo diffie-hellman-group1-sha1
120syn keyword sshdconfigKexAlgo diffie-hellman-group14-sha1
121syn keyword sshdconfigKexAlgo diffie-hellman-group14-sha256
122syn keyword sshdconfigKexAlgo diffie-hellman-group16-sha512
123syn keyword sshdconfigKexAlgo diffie-hellman-group18-sha512
124syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha1
125syn keyword sshdconfigKexAlgo diffie-hellman-group-exchange-sha256
126syn keyword sshdconfigKexAlgo ecdh-sha2-nistp256
127syn keyword sshdconfigKexAlgo ecdh-sha2-nistp384
128syn keyword sshdconfigKexAlgo ecdh-sha2-nistp521
129syn keyword sshdconfigKexAlgo mlkem768x25519-sha256
130syn keyword sshdconfigKexAlgo mlkem768nistp256-sha256
131syn keyword sshdconfigKexAlgo mlkem1024nistp384-sha384
132
133syn match sshdconfigKexAlgo "\<curve25519-sha256\%(@libssh\.org\)\?\>"
134syn match sshdconfigKexAlgoDeprecated "\<sntrup4591761x25519-sha512@tinyssh\.org\>"
135syn match sshconfigKexAlgo  "\<sntrup761x25519-sha512\%(@openssh\.com\)\?\>"
136
137syn keyword sshdconfigTunnel	point-to-point ethernet
138
139syn keyword sshdconfigSubsystem internal-sftp
140
141syn match sshdconfigVar	    "%[CDFfhiKksTtUu]\>"
142syn match sshdconfigVar	    "%%"
143
144syn match sshdconfigSpecial "[*?]"
145
146syn match sshdconfigNumber "\<\d\+\>"
147syn match sshdconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>"
148syn match sshdconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>"
149" FIXME: this matches quite a few things which are NOT valid IPv6 addresses
150syn match sshdconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}:\d\+\>"
151syn match sshdconfigTime "\<\(\d\+[sSmMhHdDwW]\)\+\>"
152
153
154" case off
155syn case ignore
156
157
158" Keywords
159" Also includes RDomain, but that is a keyword.
160syn keyword sshdconfigMatch Host User Group Address LocalAddress LocalPort
161
162syn keyword sshdconfigKeyword AcceptEnv
163syn keyword sshdconfigKeyword AddressFamily
164syn keyword sshdconfigKeyword AllowAgentForwarding
165syn keyword sshdconfigKeyword AllowGroups
166syn keyword sshdconfigKeyword AllowStreamLocalForwarding
167syn keyword sshdconfigKeyword AllowTcpForwarding
168syn keyword sshdconfigKeyword AllowUsers
169syn keyword sshdconfigKeyword AuthenticationMethods
170syn keyword sshdconfigKeyword AuthorizedKeysCommand
171syn keyword sshdconfigKeyword AuthorizedKeysCommandUser
172syn keyword sshdconfigKeyword AuthorizedKeysFile
173syn keyword sshdconfigKeyword AuthorizedPrincipalsCommand
174syn keyword sshdconfigKeyword AuthorizedPrincipalsCommandUser
175syn keyword sshdconfigKeyword AuthorizedPrincipalsFile
176syn keyword sshdconfigKeyword Banner
177syn keyword sshdconfigKeyword CASignatureAlgorithms
178syn keyword sshdconfigDeprecated ChallengeResponseAuthentication
179syn keyword sshdconfigKeyword ChannelTimeout
180syn keyword sshdconfigKeyword ChrootDirectory
181syn keyword sshdconfigKeyword Ciphers
182syn keyword sshdconfigKeyword ClientAliveCountMax
183syn keyword sshdconfigKeyword ClientAliveInterval
184syn keyword sshdconfigKeyword Compression
185syn keyword sshdconfigKeyword DebianBanner
186syn keyword sshdconfigKeyword DenyGroups
187syn keyword sshdconfigKeyword DenyUsers
188syn keyword sshdconfigKeyword DisableForwarding
189syn keyword sshdconfigKeyword ExposeAuthInfo
190syn keyword sshdconfigKeyword FingerprintHash
191syn keyword sshdconfigKeyword ForceCommand
192syn keyword sshdconfigKeyword GatewayPorts
193syn keyword sshdconfigKeyword GSSAPIAuthentication
194syn keyword sshdconfigKeyword GSSAPICleanupCredentials
195syn keyword sshdconfigKeyword GSSAPIEnablek5users
196syn keyword sshdconfigKeyword GSSAPIKexAlgorithms
197syn keyword sshdconfigKeyword GSSAPIKeyExchange
198syn keyword sshdconfigKeyword GSSAPIStoreCredentialsOnRekey
199syn keyword sshdconfigKeyword GSSAPIDelegateCredentials
200syn keyword sshdconfigKeyword GSSAPIStrictAcceptorCheck
201syn keyword sshdconfigKeyword HostbasedAcceptedAlgorithms
202syn keyword sshdconfigKeyword HostbasedAuthentication
203syn keyword sshdconfigKeyword HostbasedUsesNameFromPacketOnly
204syn keyword sshdconfigKeyword HostCertificate
205syn keyword sshdconfigKeyword HostKey
206syn keyword sshdconfigKeyword HostKeyAgent
207syn keyword sshdconfigKeyword HostKeyAlgorithms
208syn keyword sshdconfigKeyword IgnoreRhosts
209syn keyword sshdconfigKeyword IgnoreUserKnownHosts
210syn keyword sshdconfigKeyword Include
211syn keyword sshdconfigKeyword IPQoS
212syn keyword sshdconfigKeyword KbdInteractiveAuthentication
213syn keyword sshdconfigKeyword KerberosAuthentication
214syn keyword sshdconfigKeyword KerberosGetAFSToken
215syn keyword sshdconfigKeyword KerberosOrLocalPasswd
216syn keyword sshdconfigKeyword KerberosTicketCleanup
217syn keyword sshdconfigKeyword KexAlgorithms
218syn keyword sshdconfigKeyword ListenAddress
219syn keyword sshdconfigKeyword LoginGraceTime
220syn keyword sshdconfigKeyword LogLevel
221syn keyword sshdconfigKeyword LogVerbose
222syn keyword sshdconfigKeyword MACs
223syn keyword sshdconfigKeyword Match
224syn keyword sshdconfigKeyword MaxAuthTries
225syn keyword sshdconfigKeyword MaxSessions
226syn keyword sshdconfigKeyword MaxStartups
227syn keyword sshdconfigKeyword ModuliFile
228syn keyword sshdconfigKeyword PAMServiceName
229syn keyword sshdconfigKeyword PasswordAuthentication
230syn keyword sshdconfigKeyword PermitEmptyPasswords
231syn keyword sshdconfigKeyword PermitListen
232syn keyword sshdconfigKeyword PermitOpen
233syn keyword sshdconfigKeyword PermitRootLogin
234syn keyword sshdconfigKeyword PermitTTY
235syn keyword sshdconfigKeyword PermitTunnel
236syn keyword sshdconfigKeyword PermitUserEnvironment
237syn keyword sshdconfigKeyword PermitUserRC
238syn keyword sshdconfigKeyword PerSourceMaxStartups
239syn keyword sshdconfigKeyword PerSourceNetBlockSize
240syn keyword sshdconfigKeyword PerSourcePenalties
241syn keyword sshdconfigKeyword PerSourcePenaltyExemptList
242syn keyword sshdconfigKeyword PidFile
243syn keyword sshdconfigKeyword Port
244syn keyword sshdconfigKeyword PrintLastLog
245syn keyword sshdconfigKeyword PrintMotd
246syn keyword sshdconfigKeyword PubkeyAcceptedAlgorithms
247syn keyword sshdconfigKeyword PubkeyAcceptedKeyTypes
248syn keyword sshdconfigKeyword PubkeyAuthentication
249syn keyword sshdconfigKeyword PubkeyAuthOptions
250syn keyword sshdconfigKeyword RDomain
251syn keyword sshdconfigKeyword RefuseConnection
252syn keyword sshdconfigKeyword RekeyLimit
253syn keyword sshdconfigKeyword RequiredRSASize
254syn keyword sshdconfigKeyword RevokedKeys
255syn keyword sshdconfigKeyword SecurityKeyProvider
256syn keyword sshdconfigKeyword SetEnv
257syn keyword sshdconfigKeyword SshdAuthPath
258syn keyword sshdconfigKeyword SshdSessionPath
259syn keyword sshdconfigKeyword StreamLocalBindMask
260syn keyword sshdconfigKeyword StreamLocalBindUnlink
261syn keyword sshdconfigKeyword StrictModes
262syn keyword sshdconfigKeyword Subsystem
263syn keyword sshdconfigKeyword SyslogFacility
264syn keyword sshdconfigKeyword TCPKeepAlive
265syn keyword sshdconfigKeyword TrustedUserCAKeys
266syn keyword sshdconfigKeyword UnusedConnectionTimeout
267syn keyword sshdconfigKeyword UseDNS
268syn keyword sshdconfigKeyword UsePAM
269syn keyword sshdconfigKeyword VersionAddendum
270syn keyword sshdconfigKeyword X11DisplayOffset
271syn keyword sshdconfigKeyword X11Forwarding
272syn keyword sshdconfigKeyword X11MaxDisplays
273syn keyword sshdconfigKeyword X11UseLocalhost
274syn keyword sshdconfigKeyword XAuthLocation
275
276
277" Define the default highlighting
278
279hi def link sshdconfigComment              Comment
280hi def link sshdconfigTodo                 Todo
281hi def link sshdconfigHostPort             sshdconfigConstant
282hi def link sshdconfigTime                 Number
283hi def link sshdconfigNumber               Number
284hi def link sshdconfigConstant             Constant
285hi def link sshdconfigYesNo                Boolean
286hi def link sshdconfigAddressFamily        sshdconfigEnum
287hi def link sshdconfigPrivilegeSeparation  sshdconfigEnum
288hi def link sshdconfigTcpForwarding        sshdconfigEnum
289hi def link sshdconfigCiphers              sshdconfigEnum
290hi def link sshdconfigCiphersDeprecated    sshdconfigDeprecated
291hi def link sshdconfigMAC                  sshdconfigEnum
292hi def link sshdconfigMACDeprecated        sshdconfigDeprecated
293hi def link sshdconfigHostKeyAlgo          sshdconfigEnum
294hi def link sshdconfigHostKeyAlgoDeprecated sshdconfigDeprecated
295hi def link sshdconfigRootLogin            sshdconfigEnum
296hi def link sshdconfigLogLevel             sshdconfigEnum
297hi def link sshdconfigSysLogFacility       sshdconfigEnum
298hi def link sshdconfigVar                  sshdconfigEnum
299hi def link sshdconfigCompression          sshdconfigEnum
300hi def link sshdconfigIPQoS                sshdconfigEnum
301hi def link sshdconfigIPQoSDeprecated      sshdconfigDeprecated
302hi def link sshdconfigKexAlgo              sshdconfigEnum
303hi def link sshdconfigKexAlgoDeprecated    sshdconfigDeprecated
304hi def link sshdconfigTunnel               sshdconfigEnum
305hi def link sshdconfigSubsystem            sshdconfigEnum
306hi def link sshdconfigPubkeyAuthOptions    sshdconfigEnum
307hi def link sshdconfigEnum                 Function
308hi def link sshdconfigSpecial              Special
309hi def link sshdconfigKeyword              Keyword
310hi def link sshdconfigMatch                Type
311hi def link sshdconfigDeprecated           Error
312
313let b:current_syntax = "sshdconfig"
314
315" vim:set ts=8 sw=2 sts=2: