neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

sshdconfig.vim (13352B)


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