Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
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)

Options

Topic review

jens123

After I have experimented a lot, I have it figured out:

sessionOptions.AddRawSettings("Compression", "0");
sessionOptions.AddRawSettings("SshProt", "1");

Nevertheless thanks.:mrgreen:
jens123

How to select the SSH-1 protocol for SFtp via .Net assembly

Hello,

I need to upload some files to a server that only understands Sftp SSH-1.
Before asking the question, an update to SSH-2 is not possible.:cry:

I can connect to the server successfully with the desktop tool of WinSCP if I
choose the preferred SSH version 1, but how I do it via .Net.:?:

When running the code below I get the exception "Incoming packet was garbled on decryption"

Thanks in advance.

Source code:

SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = "192.168.1.230",
PortNumber = 22,
UserName = "root",
Password = "xxxxxxxxxxx",
SshHostKeyFingerprint = null,
};

using (WinSCP.Session session = new WinSCP.Session())
{
// Connect
session.DefaultConfiguration = false;
session.Open(sessionOptions);

.......