⬇ Importing from MobaXterm ⬇ Importing from MobaXterm

⬇ Importing from MobaXterm

Dmitry Machulo Dmitry Machulo

This article describes how to import data (sessions) from MobaXterm.

For that you'll need to:

  1. export the data from MobaXterm as described here,
  2. convert the exported file to an ssh config file (see below),
  3. import the ssh config file into Termius.

Convert from MobaXterm

$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
$output=switch -regex -file '.\MobaXterm Sessions.mxtsessions'
"SubRep=(.*)" { $folder=$matches[1] }
"(.+)\s*=\s*#109#0%([^%]*)%(\d+)%([^%]*)%[^%]*%[^%]*%[^%]*%[^%]*%[^%]*%[^%]*%[^%]*%[^%]*%[^%]*%[^%]*%([^%]*)(%.*)?" {
$name=$matches[1]; $hostname=$matches[2]; $port=$matches[3]; $user=$matches[4]; $ssh_key=$matches[5];
if ($hostname) {
"Host `"$folder\$name`""
" Hostname $hostname"
if ($user) { " User $user" }
if ($port) { " Port $port" }
if ($ssh_key.Trim()) { " IdentityFile $ssh_key" }
$output > ssh_config

  Substitute '.\MobaXterm Sessions.mxtsessions' with the location of the file created by MobaXterm.

If you’re having any difficulties importing data, please, contact us 👨🏼‍🔧

Add comment

Please sign in to leave a comment.