ssh bash file problem

Hi! im having a small problem. im running linux , and we have this server running windows, now on windows there is a batch file called myfile. bat that does some stuff,,, now i want to write a bash script that ssh into my windows pc and automaticaly runs the bat file.

Everything Linux 1798 This topic was started by ,


data/avatar/default/avatar11.webp

22 Posts
Location -
Joined 2007-01-08
Hi!
 
im having a small problem. im running linux , and we have this server running windows,
now on windows there is a batch file called myfile.bat that does some stuff,,,
now i want to write a bash script that ssh into my windows pc and automaticaly runs the bat file....
 
i googled it and i found the following example :
ssh User@Host "command 1; command 2; command3"
 
so i ran :
 
ssh myusername@myhost "c:\ftp\admin\myfile.bat;"
 
and it doesnt work....
 
but to test it i ran :
 
ssh myusername@myhost "echo mytest > mytest.txt;"
 
and that works perfectely it creates the file and everything...
please can someone help me with this!!!!
 
thanks in advance!
 

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.