' The following three lines are specific to WinsshdCfgManip. Set cfg = CreateObject("WinsshdCfgManip.WinsshdCfgManip") cfg.LoadKeypairFromRegistry() pubkey = "my.server.address " & cfg.GetPublicKeyOpenSsh("My WinSSHD host key") ' Ask for output file to write to. sFileName = InputBox("Public key output file: ") If sFileName = "" Then WScript.Quit(0) ' Write to output file. Const ForWriting = 2 Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile(sFileName, ForWriting, True) f.WriteLine pubkey