Topic "Cannot authenticate using script?"

Author Message
o_o
[View user's profile]

Joined: 2007-03-29
Posts: 10
Location: Germany
Hi,
I have used the GUI version of WinSCP to transfer files from my home to my university Linux account since about a year. I am now getting into scripting, and I cannot figure out how to get this to work. I have gone through the documentation on scripting and the FAQ but still I think that I might be doing something obviously wrong.

Using the WinSCP GUI I can log in to my university account both using the Keyboard and using a key. I now tried the following script: (called winscp_trial.sh in my My Documents) My username is masca

Code:
option batch on
option confirm off
open masca:passwd@something.uni-stuttgart.de
cd /home/home_dir


I started the cmd prompt on Win XP and got into the My Documents and then entered the following command:

Code:
"C:\Program Files\WinSCP3\WinSCP3.exe" /console /script=winscp_trial.sh


I get a black window that opens up with the following text

batch on
confirm off
Initialisation...
Searching for host...
Connecting to host...
Authenticating...
Using username "maca".
Using keyboard-interactive authentication.
Authenticating with pre-entered password.
Access denied.
Using keyboard-interactive authentication.
Authentication failed.
Authentication log (see session log for details):
Using username "maca".
Using keyboard-interactive authentication.
Authenticating with pre-entered password.
Access denied.
Using keyboard-interactive authentication.

Unable to authenticate
No session.
winscp>

Any ideas on what I need to do next. Thanks to all who take their time to help me.
Regards,
O.O.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
If you login using private key, you have these options:
1) Setup stored session with associated key and use the name of the stored session as parameter of "open" command.
2) Use /privatekey command line option to specify default private key.
3) Use pageant.

Last edited by martin on 2008-02-14; edited 2 times in total
o_o
[View user's profile]

Joined: 2007-03-29
Posts: 10
Location: Germany
prikryl wrote:
If you login using provate key, you have these options:
1) Setup stored session with associated key and use the name of the stored session as parameter of "open" command.
2) Use /privatkey command line option to specify default private key.
3) Use pageant.


Dear Martin,
Thanks for responding. I dont know why I cannot login either using a password, or using a private key. However making a stored session and then using the name of the session in the script works.
I have a few more questions, but I think I would post a separate threads on those topics. Thanks for your site and taking the time to answer our questions.
Regards,
O.O.
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