uploading a file through command line with SSH
Been wrestling with this all morning and hit a point where I need to raise my hand for some assistance.
Here is my line I'm running and output
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"
Searching for host...
Host does not exist
batch abort
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "user".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] user@remotesite.com
Unknown command '1024'.
when I run it in these chunks it works without issue. Just combined it complains. Any thoughts?
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
so I'm thinking it's syntax at this point. I just don't see it at this point. Any help?
Here is my line I'm running and output
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"
Searching for host...
Host does not exist
batch abort
confirm off
Searching for host...
Connecting to host...
Authenticating...
Using username "user".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] user@remotesite.com
Unknown command '1024'.
when I run it in these chunks it works without issue. Just combined it complains. Any thoughts?
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
so I'm thinking it's syntax at this point. I just don't see it at this point. Any help?