Password prompt when just entering session in cmd/console

Advertisement

Fawkes
Joined:
Posts:
1

Password prompt when just entering session in cmd/console

Hi all,

I am new to using WinSCP and file transfer in general. I have session saved as user@sftp.test.ca with the login credentials of user//password. I have created the session via the GUI and saved the password so it doesn't prompt me when I login the Session.

The reason why I am just trying to use this session is because of the proxy settings. Not quite sure how to do the proxy settings within the cmd/console.

However, when I open up the console/cmd and type in open user@sftp.test.ca, it prompts me for a password. I am assuming that this command is the same if I use it in a script. How can I do this such that I do not need to enter a password when prompt for one?

In the long run, I am aiming for a script that logs in, moves a few directories, puts a file, based on success or failure, does a few more things and then close. One step at a time...

TLDR;

Proxy: proxy.home.ca:8080
Server: sftp.test.ca:2222
User: user
Password: password

What open command can I use to connect to the server without the use of session?

Reply with quote

Advertisement

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

Re: Password prompt when just entering session in cmd/console

If your saved site is indeed named user@sftp.test.ca, then using the open user@sftp.test.ca command in scripting should use the saved site (including the password). Of course, as long as the script shares configuration with GUI (what typically requires that you run the script using the same local account).
https://winscp.net/eng/docs/scripting#configuration
If this does not work, attach a log file both from the script and GUI.

Though as the link above also shows, this is may actually not be the best approach.

Instead, you can have WinSCP GUI generate a script file with complete settings:
https://winscp.net/eng/docs/ui_generateurl#script

Reply with quote

Advertisement

You can post new topics in this forum