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