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

martin

Still, "it fails" is too value. You must get some error message or some error code at least. I do not believe that all information that you have is "it fails".
nashtf

The path is of course a valid path to the server, not a local path. Just put a local path for placeholder purposes.
Guest

I don't even get to creating the session. I've stripped down my code to this and it fails. The exception message doesn't even get printed to the report when running through Integration Services Catalogs. This runs perfectly fine on my local machine through Visual Studio debug mode.

        public void Main()

        {
            try
            {
                SessionOptions sessionOptions = new SessionOptions
                {
                    Protocol = Protocol.Sftp,
                    HostName = "host.site.com",
                    UserName = "user",
                    SshHostKeyFingerprint = "ssh-rsa 2048 fingerprint"
                    PrivateKeyPassphrase = "password",
                    SshPrivateKeyPassphrase = @"C:\Path\To\Key"
                };
            }
            catch (Exception e)
            {
                Dts.Events.FireError(-1, "Session setup", e.Message, String.Empty, 0);
            }
        }
martin

Re: Fail to send using passphrase when executed from SSIS Script Task in a deployed package

Sorry, but "fail" is too vague.

Please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, set Session.SessionLogPath. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
nashtf

Fail to send using passphrase when executed from SSIS Script Task in a deployed package

I'm using a C# script task in SSIS 2012 which uses a WinSCP assembly. It works fine using SFTP without a public key, but passing the Passphrase parameter causes it to fail. I've tried generating the SessionOptions first before opening the connection, but it fails. I've eliminated possibility of file paths and permissions as it runs perfectly well from my local machine, but it fails when deployed to the server. Server packages work perfectly fine when there is a password passed in, but fail with Passphrase. Is there an issue with the Passphrase parameter and certain build versions?