Topic "Password prompt when just entering session in cmd/console"

Author Message
Fawkes
[View user's profile]

Joined: 2016-10-11
Posts: 1
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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
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
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