Re: uploading a file through command line with SSH
You need to double the double-quotes around command arguments:
winscp /command "option batch abort" "option confirm off" "open sftp://user:password@remotesite.com -hostkey=""ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx""" "put -nopreservetime tester.txt" "exit"
See:
https://winscp.net/eng/docs/commandline#syntax
winscp /command "option batch abort" "option confirm off" "open sftp://user:password@remotesite.com -hostkey=""ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx""" "put -nopreservetime tester.txt" "exit"
See:
https://winscp.net/eng/docs/commandline#syntax