Authenticate using keyboard-interactive authentication

Advertisement

nbettin
Joined:
Posts:
1

Authenticate using keyboard-interactive authentication

Today I decided to try updating code to use COM library instead command line scripting. But can't get past the keyboard-interactive authentication. Is there a way to handle this?

Here's my log when trying to connect using the COM libary and supplying the username and password as SessionOptions.

. 2012-10-16 15:46:46.811 Initialised AES-256 SDCTR client->server encryption
. 2012-10-16 15:46:46.811 Initialised HMAC-SHA1 client->server MAC algorithm
. 2012-10-16 15:46:46.812 Initialised AES-256 SDCTR server->client encryption
. 2012-10-16 15:46:46.812 Initialised HMAC-SHA1 server->client MAC algorithm
! 2012-10-16 15:46:46.813 Using username "username".
. 2012-10-16 15:46:46.813 Attempting keyboard-interactive authentication
. 2012-10-16 15:46:46.815 Prompt (6, SSH server authentication, Using keyboard-interactive authentication.
. 2012-10-16 15:46:46.815 Please enter your username and password, Username: )
. 2012-10-16 15:46:46.815 Disconnected: Unable to authenticate


This is what currently works using command line scripting:
' Feed in the scripting commands
winscp.StandardInput.WriteLine("option batch abort")
winscp.StandardInput.WriteLine("option confirm off")
winscp.StandardInput.WriteLine("option exclude */")
winscp.StandardInput.WriteLine("open servername")
winscp.StandardInput.WriteLine("username")
winscp.StandardInput.WriteLine("username")
winscp.StandardInput.WriteLine("password")
winscp.StandardInput.WriteLine("cd incoming")
winscp.StandardInput.WriteLine("ls")
winscp.StandardInput.WriteLine("lcd c:\temp")
winscp.StandardInput.WriteLine("get -delete *.*")
winscp.StandardInput.WriteLine("ls")
winscp.StandardInput.WriteLine("close")
winscp.StandardInput.WriteLine("exit")
winscp.StandardInput.Close()

Reply with quote

Advertisement

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

Re: Authenticate using keyboard-interactive authentication

WinSCP scripting (nor .NET assembly) does not support multi-prompt keyboard interactive authentication. I'm sorry.

Reply with quote

Advertisement

You can post new topics in this forum