1" Vim syntax file 2" Language: OpenSSH client configuration file (ssh_config) 3" Author: David Necas (Yeti) 4" Maintainer: Dominik Fischer <d dot f dot fischer at web dot de> 5" Contributor: Leonard Ehrenfried <[email protected]> 6" Contributor: Karsten Hopp <[email protected]> 7" Last Change: 2016 Apr 7 8" SSH Version: 7.2p2 9" 10 11" Setup 12if version >= 600 13 if exists("b:current_syntax") 14 finish 15 endif 16else 17 syntax clear 18endif 19 20if version >= 600 21 setlocal iskeyword=_,-,a-z,A-Z,48-57 22else 23 set iskeyword=_,-,a-z,A-Z,48-57 24endif 25 26 27" case on 28syn case match 29 30 31" Comments 32syn match sshconfigComment "^#.*$" contains=sshconfigTodo 33syn match sshconfigComment "\s#.*$" contains=sshconfigTodo 34 35syn keyword sshconfigTodo TODO FIXME NOTE contained 36 37 38" Constants 39syn keyword sshconfigYesNo yes no ask confirm 40syn keyword sshconfigYesNo any auto 41syn keyword sshconfigYesNo force autoask none 42 43syn keyword sshconfigCipher 3des blowfish 44 45syn keyword sshconfigCiphers 3des-cbc 46syn keyword sshconfigCiphers blowfish-cbc 47syn keyword sshconfigCiphers cast128-cbc 48syn keyword sshconfigCiphers arcfour 49syn keyword sshconfigCiphers arcfour128 50syn keyword sshconfigCiphers arcfour256 51syn keyword sshconfigCiphers aes128-cbc 52syn keyword sshconfigCiphers aes192-cbc 53syn keyword sshconfigCiphers aes256-cbc 54syn match sshconfigCiphers "\<rijndael-cbc@lysator\.liu.se\>" 55syn keyword sshconfigCiphers aes128-ctr 56syn keyword sshconfigCiphers aes192-ctr 57syn keyword sshconfigCiphers aes256-ctr 58syn match sshconfigCiphers "\<aes128-gcm@openssh\.com\>" 59syn match sshconfigCiphers "\<aes256-gcm@openssh\.com\>" 60syn match sshconfigCiphers "\<chacha20-poly1305@openssh\.com\>" 61 62syn keyword sshconfigMAC hmac-sha1 63syn keyword sshconfigMAC mac-sha1-96 64syn keyword sshconfigMAC mac-sha2-256 65syn keyword sshconfigMAC mac-sha2-512 66syn keyword sshconfigMAC mac-md5 67syn keyword sshconfigMAC mac-md5-96 68syn keyword sshconfigMAC mac-ripemd160 69syn match sshconfigMAC "\<hmac-ripemd160@openssh\.com\>" 70syn match sshconfigMAC "\<umac-64@openssh\.com\>" 71syn match sshconfigMAC "\<umac-128@openssh\.com\>" 72syn match sshconfigMAC "\<hmac-sha1-etm@openssh\.com\>" 73syn match sshconfigMAC "\<hmac-sha1-96-etm@openssh\.com\>" 74syn match sshconfigMAC "\<hmac-sha2-256-etm@openssh\.com\>" 75syn match sshconfigMAC "\<hmac-sha2-512-etm@openssh\.com\>" 76syn match sshconfigMAC "\<hmac-md5-etm@openssh\.com\>" 77syn match sshconfigMAC "\<hmac-md5-96-etm@openssh\.com\>" 78syn match sshconfigMAC "\<hmac-ripemd160-etm@openssh\.com\>" 79syn match sshconfigMAC "\<umac-64-etm@openssh\.com\>" 80syn match sshconfigMAC "\<umac-128-etm@openssh\.com\>" 81 82syn keyword sshconfigHostKeyAlgo ssh-ed25519 83syn match sshconfigHostKeyAlgo "\<ssh-ed25519-cert-v01@openssh\.com\>" 84syn keyword sshconfigHostKeyAlgo ssh-rsa 85syn keyword sshconfigHostKeyAlgo ssh-dss 86syn keyword sshconfigHostKeyAlgo ecdsa-sha2-nistp256 87syn keyword sshconfigHostKeyAlgo ecdsa-sha2-nistp384 88syn keyword sshconfigHostKeyAlgo ecdsa-sha2-nistp521 89syn match sshconfigHostKeyAlgo "\<ssh-rsa-cert-v01@openssh\.com\>" 90syn match sshconfigHostKeyAlgo "\<ssh-dss-cert-v01@openssh\.com\>" 91syn match sshconfigHostKeyAlgo "\<ecdsa-sha2-nistp256-cert-v01@openssh\.com\>" 92syn match sshconfigHostKeyAlgo "\<ecdsa-sha2-nistp384-cert-v01@openssh\.com\>" 93syn match sshconfigHostKeyAlgo "\<ecdsa-sha2-nistp521-cert-v01@openssh\.com\>" 94 95syn keyword sshconfigPreferredAuth hostbased publickey password gssapi-with-mic 96syn keyword sshconfigPreferredAuth keyboard-interactive 97 98syn keyword sshconfigLogLevel QUIET FATAL ERROR INFO VERBOSE 99syn keyword sshconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3 100syn keyword sshconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1 101syn keyword sshconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7 102syn keyword sshconfigAddressFamily inet inet6 103 104syn match sshconfigIPQoS "af1[123]" 105syn match sshconfigIPQoS "af2[123]" 106syn match sshconfigIPQoS "af3[123]" 107syn match sshconfigIPQoS "af4[123]" 108syn match sshconfigIPQoS "cs[0-7]" 109syn keyword sshconfigIPQoS ef lowdelay throughput reliability 110syn keyword sshconfigKbdInteractive bsdauth pam skey 111 112syn keyword sshconfigKexAlgo diffie-hellman-group1-sha1 113syn keyword sshconfigKexAlgo diffie-hellman-group14-sha1 114syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha1 115syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha256 116syn keyword sshconfigKexAlgo ecdh-sha2-nistp256 117syn keyword sshconfigKexAlgo ecdh-sha2-nistp384 118syn keyword sshconfigKexAlgo ecdh-sha2-nistp521 119syn match sshconfigKexAlgo "\<curve25519-sha256@libssh\.org\>" 120 121syn keyword sshconfigTunnel point-to-point ethernet 122 123syn match sshconfigVar "%[rhplLdun]\>" 124syn match sshconfigSpecial "[*?]" 125syn match sshconfigNumber "\d\+" 126syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>" 127syn match sshconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>" 128syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>" 129syn match sshconfigHostPort "\(Host \)\@<=.\+" 130syn match sshconfigHostPort "\(HostName \)\@<=.\+" 131 132" case off 133syn case ignore 134 135 136" Keywords 137syn keyword sshconfigHostSect Host 138 139syn keyword sshconfigMatch canonical exec host originalhost user localuser all 140 141syn keyword sshconfigKeyword AddressFamily 142syn keyword sshconfigKeyword AddKeysToAgent 143syn keyword sshconfigKeyword BatchMode 144syn keyword sshconfigKeyword BindAddress 145syn keyword sshconfigKeyword CanonicalDomains 146syn keyword sshconfigKeyword CanonicalizeFallbackLocal 147syn keyword sshconfigKeyword CanonicalizeHostname 148syn keyword sshconfigKeyword CanonicalizeMaxDots 149syn keyword sshconfigKeyword CertificateFile 150syn keyword sshconfigKeyword ChallengeResponseAuthentication 151syn keyword sshconfigKeyword CheckHostIP 152syn keyword sshconfigKeyword Cipher 153syn keyword sshconfigKeyword Ciphers 154syn keyword sshconfigKeyword ClearAllForwardings 155syn keyword sshconfigKeyword Compression 156syn keyword sshconfigKeyword CompressionLevel 157syn keyword sshconfigKeyword ConnectTimeout 158syn keyword sshconfigKeyword ConnectionAttempts 159syn keyword sshconfigKeyword ControlMaster 160syn keyword sshconfigKeyword ControlPath 161syn keyword sshconfigKeyword ControlPersist 162syn keyword sshconfigKeyword DynamicForward 163syn keyword sshconfigKeyword EnableSSHKeysign 164syn keyword sshconfigKeyword EscapeChar 165syn keyword sshconfigKeyword ExitOnForwardFailure 166syn keyword sshconfigKeyword ForwardAgent 167syn keyword sshconfigKeyword ForwardX11 168syn keyword sshconfigKeyword ForwardX11Timeout 169syn keyword sshconfigKeyword ForwardX11Trusted 170syn keyword sshconfigKeyword GSSAPIAuthentication 171syn keyword sshconfigKeyword GSSAPIClientIdentity 172syn keyword sshconfigKeyword GSSAPIDelegateCredentials 173syn keyword sshconfigKeyword GSSAPIKeyExchange 174syn keyword sshconfigKeyword GSSAPIRenewalForcesRekey 175syn keyword sshconfigKeyword GSSAPIServerIdentity 176syn keyword sshconfigKeyword GSSAPITrustDNS 177syn keyword sshconfigKeyword GSSAPITrustDns 178syn keyword sshconfigKeyword GatewayPorts 179syn keyword sshconfigKeyword GlobalKnownHostsFile 180syn keyword sshconfigKeyword HashKnownHosts 181syn keyword sshconfigKeyword HostKeyAlgorithms 182syn keyword sshconfigKeyword HostKeyAlias 183syn keyword sshconfigKeyword HostName 184syn keyword sshconfigKeyword HostbasedAuthentication 185syn keyword sshconfigKeyword HostbasedKeyTypes 186syn keyword sshconfigKeyword IPQoS 187syn keyword sshconfigKeyword IdentitiesOnly 188syn keyword sshconfigKeyword IdentityFile 189syn keyword sshconfigKeyword IgnoreUnknown 190syn keyword sshconfigKeyword IPQoS 191syn keyword sshconfigKeyword KbdInteractiveAuthentication 192syn keyword sshconfigKeyword KbdInteractiveDevices 193syn keyword sshconfigKeyword KexAlgorithms 194syn keyword sshconfigKeyword LocalCommand 195syn keyword sshconfigKeyword LocalForward 196syn keyword sshconfigKeyword LogLevel 197syn keyword sshconfigKeyword MACs 198syn keyword sshconfigKeyword Match 199syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost 200syn keyword sshconfigKeyword NumberOfPasswordPrompts 201syn keyword sshconfigKeyword PKCS11Provider 202syn keyword sshconfigKeyword PasswordAuthentication 203syn keyword sshconfigKeyword PermitLocalCommand 204syn keyword sshconfigKeyword Port 205syn keyword sshconfigKeyword PreferredAuthentications 206syn keyword sshconfigKeyword Protocol 207syn keyword sshconfigKeyword ProxyCommand 208syn keyword sshconfigKeyword ProxyUseFDPass 209syn keyword sshconfigKeyword PubkeyAcceptedKeyTypes 210syn keyword sshconfigKeyword PubkeyAuthentication 211syn keyword sshconfigKeyword RSAAuthentication 212syn keyword sshconfigKeyword RekeyLimit 213syn keyword sshconfigKeyword RemoteForward 214syn keyword sshconfigKeyword RequestTTY 215syn keyword sshconfigKeyword RhostsRSAAuthentication 216syn keyword sshconfigKeyword SendEnv 217syn keyword sshconfigKeyword ServerAliveCountMax 218syn keyword sshconfigKeyword ServerAliveInterval 219syn keyword sshconfigKeyword SmartcardDevice 220syn keyword sshconfigKeyword StrictHostKeyChecking 221syn keyword sshconfigKeyword TCPKeepAlive 222syn keyword sshconfigKeyword Tunnel 223syn keyword sshconfigKeyword TunnelDevice 224syn keyword sshconfigKeyword UseBlacklistedKeys 225syn keyword sshconfigKeyword UsePrivilegedPort 226syn keyword sshconfigKeyword User 227syn keyword sshconfigKeyword UserKnownHostsFile 228syn keyword sshconfigKeyword UseRoaming 229syn keyword sshconfigKeyword VerifyHostKeyDNS 230syn keyword sshconfigKeyword VisualHostKey 231syn keyword sshconfigKeyword XAuthLocation 232 233" Define the default highlighting 234if version >= 508 || !exists("did_sshconfig_syntax_inits") 235 if version < 508 236 let did_sshconfig_syntax_inits = 1 237 command -nargs=+ HiLink hi link <args> 238 else 239 command -nargs=+ HiLink hi def link <args> 240 endif 241 242 HiLink sshconfigComment Comment 243 HiLink sshconfigTodo Todo 244 HiLink sshconfigHostPort sshconfigConstant 245 HiLink sshconfigNumber sshconfigConstant 246 HiLink sshconfigConstant Constant 247 HiLink sshconfigYesNo sshconfigEnum 248 HiLink sshconfigCipher sshconfigEnum 249 HiLink sshconfigCiphers sshconfigEnum 250 HiLink sshconfigMAC sshconfigEnum 251 HiLink sshconfigHostKeyAlgo sshconfigEnum 252 HiLink sshconfigLogLevel sshconfigEnum 253 HiLink sshconfigSysLogFacility sshconfigEnum 254 HiLink sshconfigAddressFamily sshconfigEnum 255 HiLink sshconfigIPQoS sshconfigEnum 256 HiLink sshconfigKbdInteractive sshconfigEnum 257 HiLink sshconfigKexAlgo sshconfigEnum 258 HiLink sshconfigTunnel sshconfigEnum 259 HiLink sshconfigPreferredAuth sshconfigEnum 260 HiLink sshconfigVar sshconfigEnum 261 HiLink sshconfigEnum Identifier 262 HiLink sshconfigSpecial Special 263 HiLink sshconfigKeyword Keyword 264 HiLink sshconfigHostSect Type 265 HiLink sshconfigMatch Type 266 delcommand HiLink 267endif 268 269let b:current_syntax = "sshconfig" 270 271" vim:set ts=8 sw=2 sts=2: 272