⬇ Importing from WinSCP ⬇ Importing from WinSCP

⬇ Importing from WinSCP

Dmitry Machulo Dmitry Machulo

This article describes how to import data from WinSCP.

For that you'll need to:

  1. export the data from WinSCP via 'Export/Backup configuration',
  2. convert the exported file to an ssh config file (see below),
  3. import the ssh config file into Termius.

Convert from WinSCP

$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
cat .\WinSCP.ini |
where { $_ -match '(HostName=)|(UserName=)|(PortNumber=)|(PublicKeyFile=)|(Sessions\\)' } |
%{ $_ -replace '\[Sessions\\(.*)\]', 'Host "$1"' } |
%{ $_ -replace 'HostName=',' HostName ' -replace 'UserName=',' User ' -replace 'PortNumber=',' Port ' -replace 'PublicKeyFile=(.*)',' IdentifyFile "$1"' } |
%{ [uri]::UnescapeDataString($_)

Substitute '.\WinSCP.ini' with the location of the file created by WinSCP.

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

Add comment

Please sign in to leave a comment.