Highlighted
Contributor
Contributor

Run ESXi bash command from PowerCLI

Jump to solution

Is it possible to run a bash command from the PowerCLI rather than enabling the ESXi's SSH and using an application such as PuTTy?

I need to run a command similar to "sed -i 's/current/new/g' /etc/ssh/sshd_config" but I cannot enable SSH on each of the ESXi servers unless it is absolutely necessary.

Thanks for any responses

0 Kudos
1 Solution

Accepted Solutions
Highlighted
User Moderator
User Moderator

I'm afraid not.

Note that you don't need to use putty anymore if you use the Posh-SSH module.

See Use Posh-SSH instead of PuTTY


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
3 Replies
Highlighted
VMware Employee
VMware Employee

@joshuaOMNI 
Moderator: Moved to PowerCLI Discussions


Forum Usage Guidelines: https://communities.vmware.com/docs/DOC-12286
VMware Training & Certification blog: http://vmwaretraining.blogspot.com
0 Kudos
Highlighted
User Moderator
User Moderator

I'm afraid not.

Note that you don't need to use putty anymore if you use the Posh-SSH module.

See Use Posh-SSH instead of PuTTY


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
Highlighted
Contributor
Contributor

Thank you for letting me know, I will look into Posh-SSH module because it may be helpfully for other things as well.

 

0 Kudos