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 =
How do I do this in C# .NET?
Here's the WinSCP.ini section I'm trying to duplicate in .NET:
I did see
Thanks
SOLVED – with help from https://winscp.net/eng/docs/ui_generateurl
The Generate Session URL/Code is a very useful feature.
Correct format is:
not
Like I was trying.
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:
[Sessions\ec2-server] HostName=<ip> UserName=ubuntu PublicKeyFile=<ppk filepath> LocalDirectory=<local dir> RemoteDirectory=<remote dir> SftpServer=sudo%20/usr/lib/openssh/sftp-server <<<--- how do i do this in .net
session.AddRawConfiguration
, but can't figure out the correct .ini setting
Thanks
SOLVED – with help from https://winscp.net/eng/docs/ui_generateurl
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");