need help with scripts

Advertisement

sulasno
Joined:
Posts:
11

need help with scripts

I have a batch file;

X:\Path\WinSCP.exe /console /command "option echo on" "option batch abort" "option confirm off" "open sftp://username:password@tdomain.com:22 -hostkey=""rsa2@22:domain.com=0x23,bunchofnumbers""" "ls " "cd /var/www/domain/path/" "put X:\Domain\path\file.xml" "exit"

(I noticed that there is an extra " or am I missing one)

I create another batch file with the following;

@echo off
X:\path\WinSCP.com /console /script="upload.txt"

What is missing in my upload.txt?

cd X:\path\WinSCP
option echo on
option batch on
option confirm off
open sftp://username:password@domain.com:22
cd /var/www/domain/path
option transfer binary
put X:\path\chrome.exe
put X:\path\sign.exe
close
exit

where do I insert the hostkey ?

Reply with quote

Advertisement

venkatt
Joined:
Posts:
5

Try this

open sftp://username:password@domain.com:22 -privatekey=\"C:\\Documents and Settings\\Administrator\\Desktop\\key.ppk\

open sftp://username:password@domain.com:22 -hostkey="ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"

Reply with quote

sulasno
Joined:
Posts:
11

thanks for the quick response

edit

I tried and got the following at the end;

close
No session
Invalid access to memory
exit

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,268
Location:
Prague, Czechia

This is known problem of 4.2.8. Try downgrading to 4.2.7.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum