Monday, June 15, 2015

Automate putty via batch and execute a command

I use putty everyday to login to a Linux session and execute some commands.


Now since I have a thought to automate this process, I would like some help to complete this process.


I have made a batch file which contains the below commands:


Start putty.exe abc@1.1.1.1 22 -pw 1234

Using this script I am able to open a putty session.


Now I want it execute my next command as well:


ps -eaf|grp sometext

Can you please help me to achieve this?


It's a huge challenge for me.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...