0

I am running Windows 10 Pro (ver 1809) OpenSSH.  When I SSH into the Windows 10 box as an administrator, I am unable to run regedit.exe /S <reg file>.  Typing in the command just returns me to the command line prompt. I am able to successfully run the reg.exe command; I can query and make changes to the registry with reg.exe. This tells me that I am indeed executing as an admin. I have verified that 'regedit.exe' invoked in the SSH session does not work by running 'regedit.exe' from the console and using the GUI interface to examine the registry keys that I wanted to change. The keys are unchanged.

regedit.exe /S <reg file> works fine from a console admin command prompt; it just doesn't work from within an SSH session. Has anyone else seen this behavior?

7
  • you may have a look here stackoverflow.com/questions/11351283/…
    – alecxs
    May 7, 2019 at 22:46
  • I’ve never used ssh in Windows. What happens if you run some other GUI program (e.g., Notepad, WordPad, Calculator, Paint, etc.) from ssh? May 8, 2019 at 2:58
  • What do you expect regedit /s to do in your SSH terminal window? May 8, 2019 at 13:36
  • @Martin I am operating in a non-domain environment and I would like to make registry changes via an SSh session. I can make the changes using the 'reg' command but the 'regedit /S' command fails. 'regedit' is much more convenient to use as it takes '*reg' files. May 8, 2019 at 15:24
  • 1
    @Scott When I execute a GUI program (notepad) from within an SSh session nothing happens. This may be the problem with 'regedit' as it is a GUI program even though invoking it with the '/S' option does not generate any graphical output. May 8, 2019 at 15:37

1 Answer 1

1

regedit is a graphical (GUI) program, and you aren’t going to be able to run it in an ssh session.  The /S option can be used to suppress pop-up windows when you’re importing a file; e.g.,

regedit /s myfle.reg
but it doesn’t give you the normal, interactive behavior of regedit in a command-line environment.

If you’re running on a Windows computer (i.e., you’re running the ssh client on a Windows computer) and you want to edit the registry of a remote machine, you may be able to do that by running regedit on your local machine: see How to remotely edit the registry of a client computer from a host computer … and other references.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .