How to export/import PuTTy sessions list?

后端 未结 15 1183
时光取名叫无心
时光取名叫无心 2020-12-22 14:41

Is there a way to do this?

Or I have to take manually every record from Registry?

15条回答
  •  有刺的猬
    2020-12-22 14:55

    Export

    cmd.exe, require elevated prompt:

    Only sessions:

    regedit /e "%USERPROFILE%\Desktop\putty-sessions.reg" HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions
    

    All settings:

    regedit /e "%USERPROFILE%\Desktop\putty.reg" HKEY_CURRENT_USER\Software\SimonTatham
    

    Powershell:

    Only sessions:

    reg export HKCU\Software\SimonTatham\PuTTY\Sessions ([Environment]::GetFolderPath("Desktop") + "\putty-sessions.reg")
    

    All settings:

    reg export HKCU\Software\SimonTatham ([Environment]::GetFolderPath("Desktop") + "\putty.reg")
    

    Import

    Double-click on the *.reg file and accept the import.

    Alternative ways:

    cmd.exe, require elevated command prompt:

    regedit /i putty-sessions.reg
    regedit /i putty.reg
    

    PowerShell:

    reg import putty-sessions.reg
    reg import putty.reg
    

    Note: do not replace SimonTatham with your username.

    Note: It will create a reg file on the Desktop of the current user.

    Note: It will not export related SSH keys.

提交回复
热议问题