Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


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

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