PowerShell

How to use SSH in PowerShell

0
(0)

As Microsoft announced, SSH will be supported by PowerShell in Windows 10

This is a third-party solution called Posh-SSH. To use SSH in PowerShell, you must first install the Posh-SSH module from the PowerShell Gallery. It is required that Windows 10 is used, or that the Windows Management Framework 5 is installed.

Posh SSH can be installed from PowerShell as follows as Administrator.

Install-Module Posh-SSH
Get-Command -Module Posh-SSH
New-SSHSession -ComputerName "192.168.12.34" -Credential (Get-Credential)
Invoke-SSHCommand -Index 0 -Command "uname -a"

This makes it possible to execute commands on the Linux host and copy files.

PoshSSH

Posh-SSH is a PowerShell module for automating tasks against the system using the SSH protocol (OpenSSH). The module supports only a subset of the capabilities defined in RFCs https://de.wikipedia.org/wiki/Secure_Shell.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a Reply

Your email address will not be published.