How to Enable SSH Commands in Windows

Data

How to Enable SSH Commands in Windows

SSH (Secure Socket Shell) is a network protocol that can be used to securely access other machines across a network. From our perspective, using SSH can be valuable, especially if you’re looking to interact with Linux virtual machines such as Matillion servers. For example, SSH protocols could be used to:

  • Log into a Linux virtual machine
  • Copy files to/from a Linux virtual machine
  • Generate SSH keys that can be used for SSH authentication
  • Configure authentication to a remote Git repository without entering a password each time you push, pull, etc.

How to Enable SSH Commands in Windows 10

In Windows 10, SSH commands can be executed through PowerShell natively; however, the functionality must be enabled by following these steps:

Open the START menu and open Manage optional features:

Select Add a feature:

Search for SSH and install both the OpenSSH Client and the OpenSSH Server:

Restart your machine (or sign out and in again) to automatically add the set of SSH commands to your PATH environment variable. You should now be able to execute the ssh command from PowerShell:

If you see the usage message above, you can stop here and everything is set up. If not, you may have an error similar to the following:

If you see this error, keep reading to add the commands to your PATH environment variable directly.

Adding the OpenSSH Commands to Your PATH Environment Variable

Open the START menu and open Edit the system environment variables:

Select Environment Variables:

Select your Path system variable and select Edit:

Select to add a New variable and enter the location of the OpenSSH folder as a variable. By default, this should be C:\Windows\System32\OpenSSH. Then hit OK a few times to close the various menus:

You should now be able to execute the ssh command from PowerShell:

Congratulations! You now have a working SSH command that could be used to do a variety of things, as mentioned at the top of this post:

  • Log into a Linux virtual machine
  • Copy files to/from a Linux virtual machine
  • Generate SSH keys that can be used for SSH authentication
  • Configure authentication to a remote Git repository without entering a password

Check back next week for another post that builds upon this one!

More About the Author

Chris Hastie

Data Engineer
Setting up SSH-Agent in Windows for Passwordless Git Authentication SSH-Agent and OpenSSH are tools in Windows that can be used to authenticate to remote Git repositories, such as GitLab, GitHub, Azure ...
How to Enable SSH Commands in Windows SSH (Secure Socket Shell) is a network protocol that can be used to securely access other machines across a network. From our ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072