Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

You are possibly using old version of WinSCP that does not support -username.
If you have the latest version and it still does not work, please post your code.
jpantera

Thank you Martin!

Does the -username work with the open sftp://<Site> command in some way?

I'm getting error:
Unknown switch 'username'.

(But substituting %%40" for @ seems to work).

- Joe P.
jpantera

User with Character @ in SFTP account username and automation

Hello Martin, WinSCP Support,

Have a new file transfer to setup, and I use the automation script file method, building the
open sftp://<username>@<remote address>:<Port> -privatekey=<File> (Options)

connection string on the fly, automated.

This new file transfer, has the character @ in the username, so this statement will say something like
open sftp://joe@pantera@<remote address>:<Port> -privatekey=<File> (Options)

Do I need to add logic to escape the first @ character? Is that needed, or what is the recommendation?

Thanks,
Joe P.