Reputation: 167
So I am just trying to convert to powershell from bash. I was trying to find a way to SSH my server, and found out I could install win32-openssh to do so.
I installed it by:
Installing chocolatey as packageprovider using:
install-packageprovider chocolatey
Then i installed win32-openssh with the command:
install-package win32-openssh
My problem is now, how do I run this program?
Upvotes: 2
Views: 791
Reputation: 2745
You have Two Options I can think of.
Steps :
Pre-requisite : PC running Windows 10. Open PowerShell in Admin mode.
Find-Module PoSH-SSH
type 'Y' for the prompts.
Install-Module Posh-SSH
type 'A' for the prompts.
Reference: https://www.thomasmaurer.ch/2016/04/using-ssh-with-powershell/
Upvotes: 2
Reputation: 835
There's not really a need for this. If you have git installed on your Windows machine, you can add it's usr/bin folder to you path. It has ssh and other Unix tools you can use just like in Bash in PowerShell or CMD.
Upvotes: 0
Reputation: 1963
It installs the correct binaries etc. It will not add some PS cmdlets for the use off ssh inside PS.
It is all described on the package site:
This package performs the following operations that you normally have to hack at until you get what you want:
- Install Appropriate Bitness for the version of Windows
- Install to Program Files (malware protection and following advice of dev team)
- Add SSH location to System PATH
- Optionally install sshd windows service (Requires parameter - see below)
- Optionally install sshd server "key based authentication" (Requires parameter - see below)
- Cleanly uninstall all of the above (removing config files and server keys requires special switch - see below)
So you can run it from start menu, or by typing ssh.exe
into a prompt.
Upvotes: 3