Import from Kitty

This article describes how to import data from Kitty Portable.

For that you'll need to:

  1. Convert the data into an ssh config file (see below).

Convert from Kitty Portable

Windows PowerShell
Windows PowerShell
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
Get-ChildItem .\Sessions\ | Foreach-Object {
echo "Host $_.Name"
$content = Get-Content $_.FullName
$content | where { $_ -match '(^PortNumber)|(^HostName)|(^UserName)\\' } | %{ $_ -replace 'PortNumber',' Port' -replace 'HostName',' Hostname' -replace 'UserName',' User' -replace '\\', ' '}
} > ssh_config
for i in $(ls .\Sessions\); do
echo "Host $i"
grep -e '^PortNumber\\' -e '^HostName\\' -e '^UserName\\' Sessions/$i \
| sed -e 's/HostName/ Hostname/g' \
-e 's/PortNumber/ Port/g' \
-e 's/UserName/ User/g' \
-e 's,\\, ,g'
done > ssh_config

Substitute '.\Sessions\' with the directory where Kitty Portable stores your data.