Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to open an SSH session in PowerShell? Currently I use PuTTY but it would be nice if that were not required.

share|improve this question
I know it's not natively supported but I'd love to see a solution too. –  egorgry Feb 18 '10 at 17:31
what's wrong with just calling putty.exe (or plink.exe) from command line? –  Javier Feb 18 '10 at 17:37
Javier: Let's start with plink being only a SSH client and completely lacking the terminal emulation features. –  grawity Feb 18 '10 at 19:32
+1, I'd like to see a solution myself. And for the most part I hate putty so much. (SecureCRT user) –  Urda Feb 18 '10 at 20:43

8 Answers 8

up vote 14 down vote accepted

Not built in of course, but since Powershell can do anything .Net can do, there is a way.

Paid solution would be /n Software's NetCmdlets.

Free solution would be using the suggestions of this blog post.

share|improve this answer
The link to the free version appears to be deprecated. –  Colyn1337 Aug 25 at 18:07

I wrote a module for dealing with SSH sessions from PowerShell, based on the SSH.NET library found on CodePlex. It has New-SshSession to create connections (multiple targets using different credentials is supported), and then you can use Invoke-SshCommand to run commands against any number of target hosts. There's even an Enter-SshSession which has a very basic, interactive shell.

The article is here: http://www.powershelladmin.com/wiki/SSH_from_PowerShell_using_the_SSH.NET_library


share|improve this answer

Download OpenSSH for Windows and choose to install just the client during the installation. The entire installer inlcuding the server is less 3MB and the client works just fine.

share|improve this answer
There are a lot of warnings on that project about the installer stomping the System PATH variable on Windows 7 & 8 - be wary! –  Patrick M Jan 22 at 17:02

If the target machine is a Windows box, then you can use PowerShell Remoting, instead.

It's definitely not the same as SSH. There are pros (bringing objects back over the wire!) and cons (what if the target is Linux?).

share|improve this answer

There's an alternative (free) PowerShell SSH solution, using a newer library implementation, see vBlog >> SSH Client Using PowerShell

share|improve this answer

I am still posting an answer to this question, because i found the accepted answer not suiting my needs at all (Only a paid solution or another that doesn't handle the terminal well).

So the obvious solution to this problem is to install cygwin. Do a minimal install if you just want ssh, but since powershell provides a basic level of compatibility with *nix shells (basic commands are still there, "/" for directories, etc), it's really possible to use cygwin stuff inside Powershell.

Cygwin install here

share|improve this answer
Cygwin? Bleck! Might as well fire up a VM... –  Urda Oct 14 '10 at 14:50
How so ? ssh is a windows compiled executable. If you wan't to interoperate with unix-y stuff, it shouldn't be a surprise that you have to install some libs for that. –  raph.amiard Nov 4 '10 at 10:18
See the answer by Ameer Deen, I think that is the best solution here and works great. –  Hosh Sadiq Feb 14 '12 at 6:46
@HoshSadiq From the OpenSSH for Windows description: "An installer for a minimal installation of the Cygwin environment suitable for running an OpenSSH server on the Windows platform." –  Douglas Ludlow Feb 18 at 5:26

http://www.powershellinside.com/powershell/ssh/ Free for personall use.

share|improve this answer

I use Git http://git-scm.com/downloads

Includes a host of other tools like SCP and such that are useful too.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.