Bez kategorii

[Powershell] SSH? It really works… ?

Some time ago I found SSH from PowerShell using the SSH.NET library article and It really interested me. Then I thought „One Powershell console and many OS management – Windows and Linux”. Now I want to write about my opinion on this…First I created Virtual Machine with linux (SLES 11) and connected it to the network and and then I check If Can I connect via putty tool – It Works!!! So, Next I opened Powershell console and Import-Module SSH-Session (How to install module is explained in link above). Next I run command:

 New-SshSession -ComputerName -Username dgarbus

Unfortunately it’s not working. Error was told me that autenticated method was not found. So I go to SSH.NET Library and download latest library and update it in my computer. Then I try one more time to create ssh session and one more time it not working, but with different error. Now problem is with autentication with method „keyboard-interactive”.


I enabled this method in SUSE VM in file „/etc/ssh/sshd_config” with option „PasswordAuthentication” and when I tried one more time it works 🙂

My Impressions

I think, that in environments with many Windows and Linux servers its great option to manage it from the same console. Also We can write one PS script to do something in Windows and Linux Environment.

Maybe You have any idea to use this solution?