Topic "how do i send "sudo /usr/lib/openssh/sftp-server" in .net"

Author Message
[View user's profile]

Joined: 2016-06-12
Posts: 1
Location: earth
i'm connecting to an ec2 ubuntu server.
winscp works fine in the gui when i set "advanced site settings" > environment > sftp > protocol options > sftp server = "sudo /usr/lib/openssh/sftp-server"
how do i do this in c# .net?

here's the WinSCP.ini section i'm trying to duplicate in .net

PublicKeyFile=<ppk filepath>
LocalDirectory=<local dir>
RemoteDirectory=<remote dir>
SftpServer=sudo%20/usr/lib/openssh/sftp-server <<<--- how do i do this in .net

i did see session.AddRawConfiguration, but can't figure out the correct .ini setting



SOLVED - with help from
the Generate Session URL/Code is a very useful feature.

correct format is:
sessionOptions.AddRawSettings("SftpServer", "sudo /usr/lib/openssh/sftp-server");
session.AddRawSettings("SftpServer", "sudo /usr/lib/openssh/sftp-server");
like i was trying

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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License