VMware Cloud Community
joshuaOMNI
Contributor
Contributor
Jump to solution

Run ESXi bash command from PowerCLI

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

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
3 Replies
scott28tt
VMware Employee
VMware Employee
Jump to solution

@joshuaOMNI 
Moderator: Moved to PowerCLI Discussions


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

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

Reply
0 Kudos
joshuaOMNI
Contributor
Contributor
Jump to solution

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

 

Reply
0 Kudos