0

I've downloaded "openSSH-Win64", so I can ssh into a Linux server using my PowerShell.

It works if I go into the folder and call the ssh.exe. I don't wanna go into the folder every time I need to use SSH.

I've tried this tutorial but it doesn't work. When typing ssh on powershell I get this error:

ComSpec : The term 'ComSpec' is not recognized as the name of a cmdlet, function, script file, or operable program.

QUESTION:

How can I create a variable path or something so every time I type ssh into my PowerShell it will automatically call this executable file C:\Users\druml\Downloads\OpenSSH-Win64\OpenSSH-Win64\ssh.exe?

UPDATE:

I was able to get this working on the Command Line (cmd), not using PowerShell. In my case I really need to use PowerShell.

Lucas
  • 15
  • 5
  • You're probably looking for a way to set an environment path in Windows. Just saw you're using Win10. Here you go, check this on how to set the environment variable: https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10 – flen Jul 04 '17 at 06:24
  • @flen do I need to restart my Windows? it didn't work! – Lucas Jul 04 '17 at 06:39
  • I don't remember... If you can, I think it's worth a try. But are you sure you included the path correctly? – flen Jul 04 '17 at 06:48
  • take a look here: https://stackoverflow.com/questions/714877/setting-windows-powershell-path-variable – flen Jul 04 '17 at 06:49
  • You don't have to reboot your pc, you just need to reopen powershell – J. Bergmann Jul 04 '17 at 06:50

1 Answers1

1

I was able to do this by following: https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10

Once you have added the new Variable, make sure to restart PowerShell as @J. Bergmann has mentioned.

Lucas
  • 15
  • 5