Topic "command-line utility/scripting authentication error"

Author Message
dtosto

Guest


I have been using the command-line utility for a couple of years without issue.
My client uploads a small text file to their web server repeatedly, all day long.
We use a batch + script file.

Recently their hosting service changed the format of their usernames.
The format is now "mydomain.com/person@mydomain.com".
This is the username. Followed by the regular password.

The command-line executable no longer functions in this mode.
Instead of connecting and uploading the text file it should, it sits at an authentication prompt for a few seconds before disappearing, and fails.

Here is the Open command I am using:
open sftp://mydomain.com/person@mydomain.com:mypassword@mydomain.com -hostkey="ssh-rsa 1024 <the rest of my hostkey>"

Here is the action I want to take:
put -preservetime c:\mypath\test.txt /

I am able to use the command-line utility to login manually from the prompt, it just doesn't seem to like it in a batch file with script.

Figuring a WinSCP update might resolve the problem, we are now using the 5.24 beta.
In the Windows version, "Keep remote Directory Up to Date" is what I use to do what I want, but it gets interrupted several times per day.
We need it to run unattended reliably and the command-line more or less did that.

Any help is much appreciated.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
You have to URL-encode the slash in the username:
https://winscp.net/eng/docs/session_url
_________________
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