1" Vim syntax file
2" This is a GENERATED FILE. Please always refer to source file at the URI below.
3" Language: OpenSSH server configuration file (sshd_config)
4" Maintainer: David Ne\v{c}as (Yeti) <[email protected]>
5" Last Change: 2006-03-05
6" URL: http://trific.ath.cx/Ftp/vim/syntax/sshdconfig.vim
7
8" Setup
9if version >= 600
10	if exists("b:current_syntax")
11		finish
12	endif
13else
14	syntax clear
15endif
16
17if version >= 600
18	setlocal iskeyword=_,-,a-z,A-Z,48-57
19else
20	set iskeyword=_,-,a-z,A-Z,48-57
21endif
22
23syn case ignore
24
25" Comments
26syn match sshdconfigComment "#.*$" contains=sshdconfigTodo
27syn keyword sshdconfigTodo TODO FIXME NOT contained
28
29" Constants
30syn keyword sshdconfigYesNo yes no
31syn keyword sshdconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
32syn keyword sshdconfigCipher aes192-cbc aes256-cbc aes128-ctr aes256-ctr
33syn keyword sshdconfigCipher arcfour arcfour128 arcfour256 cast128-cbc
34syn keyword sshdconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
35syn keyword sshdconfigMAC hmac-md5-96
36syn keyword sshdconfigRootLogin without-password forced-commands-only
37syn keyword sshdconfigLogLevel QUIET FATAL ERROR INFO VERBOSE
38syn keyword sshdconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3
39syn keyword sshdconfigSysLogFacility DAEMON USER AUTH LOCAL0 LOCAL1 LOCAL2
40syn keyword sshdconfigSysLogFacility LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
41syn match sshdconfigSpecial "[*?]"
42syn match sshdconfigNumber "\d\+"
43syn match sshdconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>"
44syn match sshdconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>"
45syn match sshdconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}:\d\+\>"
46syn match sshdconfigTime "\<\(\d\+[sSmMhHdDwW]\)\+\>"
47
48" Keywords
49syn keyword sshdconfigKeyword AcceptEnv AddressFamily
50syn keyword sshdconfigKeyword AllowGroups AllowTcpForwarding
51syn keyword sshdconfigKeyword AllowUsers AuthorizedKeysFile Banner
52syn keyword sshdconfigKeyword ChallengeResponseAuthentication
53syn keyword sshdconfigKeyword Ciphers ClientAliveCountMax
54syn keyword sshdconfigKeyword ClientAliveInterval Compression
55syn keyword sshdconfigKeyword DenyGroups DenyUsers GSSAPIAuthentication
56syn keyword sshdconfigKeyword GSSAPICleanupCredentials GatewayPorts
57syn keyword sshdconfigKeyword HostKey HostbasedAuthentication
58syn keyword sshdconfigKeyword IgnoreRhosts IgnoreUserKnownHosts
59syn keyword sshdconfigKeyword KerberosAuthentication KerberosOrLocalPasswd
60syn keyword sshdconfigKeyword KerberosTgtPassing KerberosTicketCleanup
61syn keyword sshdconfigKeyword KerberosGetAFSToken
62syn keyword sshdconfigKeyword KeyRegenerationInterval ListenAddress
63syn keyword sshdconfigKeyword LogLevel LoginGraceTime MACs MaxAuthTries
64syn keyword sshdconfigKeyword MaxStartups PasswordAuthentication
65syn keyword sshdconfigKeyword PermitEmptyPasswords PermitRootLogin
66syn keyword sshdconfigKeyword PermitUserEnvironment PidFile Port
67syn keyword sshdconfigKeyword PrintLastLog PrintMotd Protocol
68syn keyword sshdconfigKeyword PubkeyAuthentication RSAAuthentication
69syn keyword sshdconfigKeyword RhostsAuthentication RhostsRSAAuthentication
70syn keyword sshdconfigKeyword ServerKeyBits StrictModes Subsystem
71syn keyword sshdconfigKeyword ShowPatchLevel
72syn keyword sshdconfigKeyword SyslogFacility TCPKeepAlive UseDNS
73syn keyword sshdconfigKeyword UseLogin UsePAM UsePrivilegeSeparation
74syn keyword sshdconfigKeyword X11DisplayOffset X11Forwarding
75syn keyword sshdconfigKeyword X11UseLocalhost XAuthLocation
76
77" Define the default highlighting
78if version >= 508 || !exists("did_sshdconfig_syntax_inits")
79	if version < 508
80		let did_sshdconfig_syntax_inits = 1
81		command -nargs=+ HiLink hi link <args>
82	else
83		command -nargs=+ HiLink hi def link <args>
84	endif
85
86	HiLink sshdconfigComment Comment
87	HiLink sshdconfigTodo Todo
88	HiLink sshdconfigHostPort sshdconfigConstant
89	HiLink sshdconfigTime sshdconfigConstant
90	HiLink sshdconfigNumber sshdconfigConstant
91	HiLink sshdconfigConstant Constant
92	HiLink sshdconfigYesNo sshdconfigEnum
93	HiLink sshdconfigCipher sshdconfigEnum
94	HiLink sshdconfigMAC sshdconfigEnum
95	HiLink sshdconfigRootLogin sshdconfigEnum
96	HiLink sshdconfigLogLevel sshdconfigEnum
97	HiLink sshdconfigSysLogFacility sshdconfigEnum
98	HiLink sshdconfigEnum Function
99	HiLink sshdconfigSpecial Special
100	HiLink sshdconfigKeyword Keyword
101	delcommand HiLink
102endif
103
104let b:current_syntax = "sshdconfig"
105