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