' The following three lines are specific to WinsshdCfgManip. Set cfg = CreateObject("BssCfg554.BssCfg554") cfg.LoadServerKeypairs() pubkey = "my.server.address " & cfg.GetPublicKeyOpenSsh(0) ' 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