7
|
1 " Vim syntax file
|
|
2 " Language: OpenSSH server configuration file (sshd_config)
|
2034
|
3 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
|
|
4 " Last Change: 2009-07-09
|
7
|
5
|
|
6 " Setup
|
|
7 if version >= 600
|
2034
|
8 if exists("b:current_syntax")
|
|
9 finish
|
|
10 endif
|
7
|
11 else
|
2034
|
12 syntax clear
|
7
|
13 endif
|
|
14
|
|
15 if version >= 600
|
2034
|
16 setlocal iskeyword=_,-,a-z,A-Z,48-57
|
7
|
17 else
|
2034
|
18 set iskeyword=_,-,a-z,A-Z,48-57
|
7
|
19 endif
|
|
20
|
|
21 syn case ignore
|
|
22
|
|
23 " Comments
|
|
24 syn match sshdconfigComment "#.*$" contains=sshdconfigTodo
|
|
25 syn keyword sshdconfigTodo TODO FIXME NOT contained
|
|
26
|
|
27 " Constants
|
2034
|
28 syn keyword sshdconfigYesNo yes no none
|
|
29 syn keyword sshdconfigAddressFamily any inet inet6
|
7
|
30 syn keyword sshdconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
|
714
|
31 syn keyword sshdconfigCipher aes192-cbc aes256-cbc aes128-ctr aes256-ctr
|
|
32 syn keyword sshdconfigCipher arcfour arcfour128 arcfour256 cast128-cbc
|
7
|
33 syn keyword sshdconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
|
|
34 syn keyword sshdconfigMAC hmac-md5-96
|
2034
|
35 syn match sshdconfigMAC "\<umac-64@openssh\.com\>"
|
7
|
36 syn keyword sshdconfigRootLogin without-password forced-commands-only
|
|
37 syn keyword sshdconfigLogLevel QUIET FATAL ERROR INFO VERBOSE
|
|
38 syn keyword sshdconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3
|
2034
|
39 syn keyword sshdconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1
|
|
40 syn keyword sshdconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
|
7
|
41 syn match sshdconfigSpecial "[*?]"
|
|
42 syn match sshdconfigNumber "\d\+"
|
|
43 syn match sshdconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>"
|
|
44 syn match sshdconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>"
|
2034
|
45 " FIXME: this matches quite a few things which are NOT valid IPv6 addresses
|
7
|
46 syn match sshdconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}:\d\+\>"
|
|
47 syn match sshdconfigTime "\<\(\d\+[sSmMhHdDwW]\)\+\>"
|
|
48
|
|
49 " Keywords
|
2034
|
50 syn keyword sshdconfigMatch Host User Group Address
|
|
51 syn keyword sshdconfigKeyword AcceptEnv AddressFamily AllowAgentForwarding
|
714
|
52 syn keyword sshdconfigKeyword AllowGroups AllowTcpForwarding
|
2034
|
53 syn keyword sshdconfigKeyword AllowUsers AuthorizedKeysFile
|
|
54 syn keyword sshdconfigKeyword Banner
|
|
55 syn keyword sshdconfigKeyword ChallengeResponseAuthentication ChrootDirectory
|
714
|
56 syn keyword sshdconfigKeyword Ciphers ClientAliveCountMax
|
|
57 syn keyword sshdconfigKeyword ClientAliveInterval Compression
|
2034
|
58 syn keyword sshdconfigKeyword DenyGroups DenyUsers
|
|
59 syn keyword sshdconfigKeyword ForceCommand
|
|
60 syn keyword sshdconfigKeyword GatewayPorts GSSAPIAuthentication
|
|
61 syn keyword sshdconfigKeyword GSSAPICleanupCredentials
|
|
62 syn keyword sshdconfigKeyword HostbasedAuthentication HostKey
|
714
|
63 syn keyword sshdconfigKeyword IgnoreRhosts IgnoreUserKnownHosts
|
2034
|
64 syn keyword sshdconfigKeyword KerberosAuthentication KerberosGetAFSToken
|
|
65 syn keyword sshdconfigKeyword KerberosOrLocalPasswd KerberosTicketCleanup
|
|
66 syn keyword sshdconfigKeyword KeyRegenerationInterval
|
|
67 syn keyword sshdconfigKeyword ListenAddress LoginGraceTime LogLevel
|
|
68 syn keyword sshdconfigKeyword MACs Match MaxAuthTries MaxSessions MaxStartups
|
|
69 syn keyword sshdconfigKeyword PasswordAuthentication PermitEmptyPasswords
|
|
70 syn keyword sshdconfigKeyword PermitRootLogin PermitOpen PermitTunnel
|
714
|
71 syn keyword sshdconfigKeyword PermitUserEnvironment PidFile Port
|
|
72 syn keyword sshdconfigKeyword PrintLastLog PrintMotd Protocol
|
2034
|
73 syn keyword sshdconfigKeyword PubkeyAuthentication
|
|
74 syn keyword sshdconfigKeyword RhostsRSAAuthentication RSAAuthentication
|
|
75 syn keyword sshdconfigKeyword ServerKeyBits ShowPatchLevel StrictModes
|
|
76 syn keyword sshdconfigKeyword Subsystem SyslogFacility
|
|
77 syn keyword sshdconfigKeyword TCPKeepAlive
|
|
78 syn keyword sshdconfigKeyword UseDNS UseLogin UsePAM UsePrivilegeSeparation
|
714
|
79 syn keyword sshdconfigKeyword X11DisplayOffset X11Forwarding
|
|
80 syn keyword sshdconfigKeyword X11UseLocalhost XAuthLocation
|
7
|
81
|
|
82 " Define the default highlighting
|
|
83 if version >= 508 || !exists("did_sshdconfig_syntax_inits")
|
2034
|
84 if version < 508
|
|
85 let did_sshdconfig_syntax_inits = 1
|
|
86 command -nargs=+ HiLink hi link <args>
|
|
87 else
|
|
88 command -nargs=+ HiLink hi def link <args>
|
|
89 endif
|
7
|
90
|
2034
|
91 HiLink sshdconfigComment Comment
|
|
92 HiLink sshdconfigTodo Todo
|
|
93 HiLink sshdconfigHostPort sshdconfigConstant
|
|
94 HiLink sshdconfigTime sshdconfigConstant
|
|
95 HiLink sshdconfigNumber sshdconfigConstant
|
|
96 HiLink sshdconfigConstant Constant
|
|
97 HiLink sshdconfigYesNo sshdconfigEnum
|
|
98 HiLink sshdconfigAddressFamily sshdconfigEnum
|
|
99 HiLink sshdconfigCipher sshdconfigEnum
|
|
100 HiLink sshdconfigMAC sshdconfigEnum
|
|
101 HiLink sshdconfigRootLogin sshdconfigEnum
|
|
102 HiLink sshdconfigLogLevel sshdconfigEnum
|
|
103 HiLink sshdconfigSysLogFacility sshdconfigEnum
|
|
104 HiLink sshdconfigEnum Function
|
|
105 HiLink sshdconfigSpecial Special
|
|
106 HiLink sshdconfigKeyword Keyword
|
|
107 HiLink sshdconfigMatch Type
|
|
108 delcommand HiLink
|
7
|
109 endif
|
|
110
|
|
111 let b:current_syntax = "sshdconfig"
|