Topic "ExecuteCommand and call"

Author Message
maciej
[View user's profile]

Joined: 2012-10-10
Posts: 1
I use WinSCP.dll with Visual Basic in VS 2008. FTPS (SSH).
Try execute commands like pwd, ls ... I use session.ExecuteCommand. I now that i can use session.ListDirectory ls is example.

when i try: session.ExecuteCommand("ls")

I have this Exception:
Error: WinSCP.SessionRemoteException: Server refused to start a shell/command ---> WinSCP.SessionRemoteException: Authentication log (see session log for details):
Using username "xxx".
Further authentication required

In log file i see when i try session.ListDirectory
Script: ls -- "/xxx//yyy/"
when i try session.ExecuteCommand("ls")
Script: call ls

I try Winscp.com connect to SFTP and run ls - this works. When i try "call ls" program ask for password and i have error: Further authentication required.

Why ExecuteCommand use call? What shoud i do to ExecuteCommand("ls") or ExecuteCommand("pwd")
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
First, please read below documents to better understand, what the Session.ExecuteCommand actually does. It may help you to realize that, what you are trying to do, may not make sense.
http://winscp.net/eng/docs/remote_command
http://winscp.net/eng/docs/shell_session
http://winscp.net/eng/docs/library_session_executecommand
_________________
Martin Prikryl
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