Topic "Uploading a file"

Author Message
Randyc
[View user's profile]

Joined: 2014-03-07
Posts: 1
Location: Ketchikan, Alaska
I am trying to upload a file to a remote server. Using winscp I can drag it across just fine. I have a public key stored there. When I try to use a script it wants a password enered. Before I enter my password it closes. I use "winscp.com /script=SFTPTVE.txt" on the command line, the put command is in the txt file. How do I get this to go? Actually I have
"option batch abort
option confirm off
open sftp://kpu010@scp.sssnet.com/
put tve-export.tab /home/kpu010/
exit"
in the txt file.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
You can specify your private key using -privatekey= switch of open command:
https://winscp.net/eng/docs/scriptcommand_open
_________________
Martin Prikryl
Guest




My script now contains
"option batch abort
option confirm off
open sftp://kpu010@scp.sssnet.com/ -privatekey=rsa_keypr.ppk
put tve-export.tab /home/kpu010/
exit"
In order to use the command line Winscp said I had to use keys converted by PuTTYGen.
I did this and when I run the command now I get "Server refused our key" and promts for a password.
Any suggestions?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
Did you registered public part of the key on the server?
Are you able to authenticate using GUI with the key?
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License