What is the correct syntax to use WinSCP SFTP script

Advertisement

support@overseas.be
Joined:
Posts:
1
Location:
IT Support

What is the correct syntax to use WinSCP SFTP script

Hi,

We are struggling to find out the correct syntax for a SFTP script.
We started with the generated syntax:
/log="C:\writable\path\to\log\WinSCP.log" /ini=nul /command "open sftp://XXX:pwd@site:7805/ -hostkey=""ssh-rsa 2048 generated_hostkey""" "Your command 1" "Your command 2" "exit"
We receive error:
Server offered these authentication methods: publickey
No supported authentication methods available (server sent: publickey)
Attempt to close connection due to fatal exception:
No supported authentication methods available (server sent: publickey)
We also tried to add extra parameters to the command:
winscp.exe /ini=nul /log="path\logfile" /command "open sftp://XXX:pwd@site:7805/ -hostkey=""ssh-rsa 2048 generated_hostkey"" -privatekey=""path to Private key.ppk"" -clientcert=""pzth to client certificate"" -passphrase=""password of certificate""" "exit"
Thanks for your feedback!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,121
Location:
Prague, Czechia

Re: What is the correct syntax to use WinSCP SFTP script

So what authentication are you supposed to use? Password or private key? Or both? Does the connection work in GUI? Please post log from the script (and from the GUI, if the authentication works there).

Reply with quote

Advertisement

You can post new topics in this forum