diff --git a/tabby-electron/src/sshImporters.ts b/tabby-electron/src/sshImporters.ts index b13c27421..031b88f04 100644 --- a/tabby-electron/src/sshImporters.ts +++ b/tabby-electron/src/sshImporters.ts @@ -345,17 +345,18 @@ async function convertToSSHProfiles (config: SSHConfig): Promise = config.compute(host) - if (Object.keys(configuration).map(key => key.toLowerCase()).includes('hostname')) { - myMap[host] = await convertHostToSSHProfile(host, configuration) + const hasHostName = Object.keys(configuration).some(key => key.toLowerCase() === 'hostname') + if (!hasHostName) { + configuration.HostName = host } + myMap[host] = await convertHostToSSHProfile(host, configuration) } } }