I have a script in unix that i use to run task in windows by remote invoking
eg(command written in unix):
myscript windows_IP_address "command to be executed"
eg of "command to be execute":
d:\\a.cmd or echo d:\\a.txt
etc. and it works
similarly i want to invoke and run winscp the same way and transfer file from windows to unix
what i tried:
$ myscript windows_IP_address 'd:\\blah\\blahWinSCP.com unix_user@unix_IP /hostkey "sh-rsa 1024 xx:xxx:xx:xx" /command put "d:\\blah\\blah\\a.txt" /tmp/blah/a.txt'
$ myscript windows_IP_address 'd:\\blah\\blahWinSCP.com unix_user@unix_IP -hostkey="sh-rsa 1024 xx:xxx:xx:xx" /command put "d:\\blah\\blah\\a.txt" /tmp/blah/a.txt'
$ myscript windows_IP_address 'd:\\blah\\blahWinSCP.com unix_user@unix_IP /privatekey "address ofprivate key" /command put "d:\\blah\\blah\\a.txt" /tmp/blah/a.txt'
i have tried all the combinations of the combinations of private key and hostkey
this works from windows:
d:\\blah\\blahWinSCP.com unix_user@unix_IP /command put "d:\\blah\\blah\\a.txt" /tmp/blah/a.txt
<<where the private key is taken from pageant; but in unix i have to provide the private key file location>>
the same syntax work for Putty, there the key is given by the token:
-i "address of primary key file"
is there any way to give the address of private key file or hosteky or anything that can work