running a ssh connection into batch file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Batch file to use ssh connection. So When I run the batch file
manually its works fine, but when I schedule it on schedule tasks it doesnt
work.

Help me please
 
jdonaldo said:
I have a Batch file to use ssh connection. So When I run the batch file
manually its works fine, but when I schedule it on schedule tasks it doesnt
work.

Help me please

Modify your batch file as below, schedule it, then have
a look at the two output files and all will become clear!

@echo off
echo %date% %time% Start of task > c:\test.log
echo User=%UserName%, Path=%path% >> c:\test.log
*** Insert your SSH command here*** 1>>c:\test.log 2>c:\test.err
echo ErrorLevel of SSH=%ErrorLevel% >> c:\test.log
echo %date% %time% End of task >> c:\test.log
 
Back
Top