By importing sshconfig, you can instantly add a lot of hosts and related data.
Note: SSH config import is currently available in the desktop app only.
To import from ~/.ssh/config:
- On the Hosts screen, click Add > Import.
- Click SSH config file and select the config file.
- To select a group, where you want to place the data, click root group.
- Click Save and Done.
Notes
- The
ProxyCommand
command will be ignored. JumpHost
will be converted to an item in a host chain.IdentityFile
will be ignored by the sandboxed Termius apps (Apple, Snap, Windows stores).
Current limitations
At the moment the SSH config import works well with around 500 hosts per file. If your SSH config is larger than that, you can split it into several files using the scripts provided below.
Before running one of the scripts provided below, replace ssh_config
in the script you've chosen with the name of your config file.
Linux
Windows (PowerShell)
awk '/^Host / { ++hosts; if (hosts % limit == 0) print "# import limit"} {print $0 }' \
hosts=0 limit=500 ssh_config \
| split -p '# import limit' - ssh_config-
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
$host_count=0; $filename=0;
Get-Content .\ssh_config | %{
if ($_ -match 'Host ') {[int]$host_count+=1};
if ($host_count % 500 -eq 0 -and $_ -match 'Host ') { [int]$filename+=1 };
echo $_ >> "ssh_config-$filename"
};
That script generates multiple files using the ssh_config-xx pattern. E.g. ssh_config_aa
, ssh_config_ab
.
If you're having difficulty importing data, please, contact us.
23
-3
Was this article helpful?
10 out of 23 found this helpful
Add comment
Please sign in to leave a comment.