This is my batch script. I wanted to automate restart of the mysql
cd G:\My Drive\TCL
G:
ssh -i themedcreations.pem ec2-user@ec2-3-16-127-158.us-east-2.compute.amazonaws.com
sudo su
service mysqld restart
Pause
The script is okay if I manually input the lines in cmd. I was hoping the batch file could run itself till the end, but it stops after running the ssh -i line, afterwards it requires manual input.
What went wrong? I am completely new to batch scripting. I tried timeout or wait. They all didn't work.