ssh bash file problem

This is a discussion about ssh bash file problem in the Everything Linux category; 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 , . Last reply 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 in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.
Jun 15
Created
Jun 15
Last Response
0
Likes
1 minute
Read Time
User
Users