How to Enable SSH Commands in Windows - InterWorks (2024)

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:

How to Enable SSH Commands in Windows - InterWorks (1)

Select Add a feature:

How to Enable SSH Commands in Windows - InterWorks (2)

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

How to Enable SSH Commands in Windows - InterWorks (3)

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 sshcommand from PowerShell:

How to Enable SSH Commands in Windows - InterWorks (4)

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

How to Enable SSH Commands in Windows - InterWorks (5)

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:

How to Enable SSH Commands in Windows - InterWorks (6)

Select Environment Variables:

How to Enable SSH Commands in Windows - InterWorks (7)

Select your Path system variable and select Edit:

How to Enable SSH Commands in Windows - InterWorks (8)

Select to add a Newvariable 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:

How to Enable SSH Commands in Windows - InterWorks (9)

You should now be able to execute the sshcommand from PowerShell:

How to Enable SSH Commands in Windows - InterWorks (10)

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!

How to Enable SSH Commands in Windows - InterWorks (2024)
Top Articles
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated:

Views: 5899

Rating: 5 / 5 (80 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.