openssh: make option parsing case insensitive - #5559

This commit is contained in:
Eugene Pankov
2022-01-28 22:57:14 +01:00
parent 9e9066d3cd
commit 3466d42cb1

View File

@@ -89,15 +89,16 @@ export class OpenSSHImporter extends SSHProfileImporter {
}) })
} else { } else {
const mappedKey = { const mappedKey = {
Hostname: 'host', hostname: 'host',
Port: 'port', host: 'host',
User: 'user', port: 'port',
ForwardX11: 'x11', user: 'user',
ServerAliveInterval: 'keepaliveInterval', forwardx11: 'x11',
ServerAliveCountMax: 'keepaliveCountMax', serveraliveinterval: 'keepaliveInterval',
ProxyCommand: 'proxyCommand', serveralivecountmax: 'keepaliveCountMax',
ProxyJump: 'jumpHost', proxycommand: 'proxyCommand',
}[key] proxyjump: 'jumpHost',
}[key.toLowerCase()]
if (mappedKey) { if (mappedKey) {
target[mappedKey] = value target[mappedKey] = value
} }