We help IT Professionals succeed at work.

Running linux commands into linux system remotely using powershell

4,313 Views
Last Modified: 2017-03-19
Hi Experts,

I was looking for the best way to run linux shell commands in linux system from a windows system remotely using powershell and batch.

Please let me know the best way to do it.
Comment
Watch Question

John TsioumprisIT Supervisor
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Usually the way to run commands to remote Linux system is via Putty...if my memory serves me right i never saw running commands for Linux via powershell

Author

Commented:
can we use new-sshsession to connect to linux system and execute shell commands?

Commented:
Hi,

Microsoft thoughtfully added SSH support into PowerShell so you can SSH to the linux box and even script it.
More details can be found here.

http://www.thomasmaurer.ch/2016/04/using-ssh-with-powershell/
Natty GregIn Theory (IT)
CERTIFIED EXPERT

Commented:
Putty or winscp
CERTIFIED EXPERT
Top Expert 2014
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Gerwin JansenTopic Advisor
CERTIFIED EXPERT
Most Valuable Expert 2016

Commented:
Already answered, but if you have Windows 10 then Bash on Windows may be an option for you:

https://msdn.microsoft.com/commandline/wsl/about