Import from PuTTY

This article describes how to import data from PuTTY.

For that you'll need to:

  1. Convert data from PuTTY into an ssh config file.

Convert from PuTTY

Windows PowerShell
reg export HKCU\Software\SimonTatham\PuTTY\Sessions ([Environment]::GetFolderPath("Desktop") + "\putty-sessions.reg");
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
cat .\putty-sessions.reg |
where { $_ -match '("HostName")|("UserName")|("PortNumber")|(HKEY_CURRENT_USER.+Sessions\\)' } |
%{ if ($ -match 'dword:') { $port= ($ -replace '"','' -replace 'PortNumber=dword:', '0x'); " Port $($port -as [int])" } else { $_ } } |
%{ $_ -replace 'HKEY_CURRENT_USER.+Sessions\\', 'Host ' -replace '[\[\]]',''} |
%{ $_ -replace '"HostName"=',' HostName ' -replace '"UserName"=',' User ' -replace '"PortNumber"=',' Port ' }

That script exports PuTTY sessions to a file putty-sessions.reg and generates an ssh_config file.

Converting from PuTTY