Encrypting the SFTP server password

Advertisement

Nikesh
Joined:
Posts:
2
Location:
Bangalore

Encrypting the SFTP server password

Hello,
I am using an SSIS package script task which has reference to winscp.dll and I am using

SessionOptions sessionOptions = new SessionOptions
{
Protocol = Protocol.Sftp,
HostName = ftpSite,
UserName = username,
Password = password,
SshHostKeyFingerprint = sshKey
};
using (Session session = new Session())
{
// WinSCP .NET assembly must be in GAC to be used with SSIS,
// set path to WinSCP.exe explicitly, if using non-default path.
session.ExecutablePath = winscpPath;
session.DisableVersionCheck = true;

if (winSCPLog)
{
session.SessionLogPath = @winSCPLogPath + @"WinscpSessionLog.txt";
session.DebugLogPath = @winSCPLogPath + @"WinscpDebugLog.txt";
}

// Connect
session.Timeout = new TimeSpan(0, 2, 0); // two minutes
session.Open(sessionOptions);
}
But here my company does not want SFTP server password to be visible to others(even with the developers). Do we have an option like using the WINSCP client(GUI), we can save a site information(site,username and password) and directly open the FTP session in the scripting by passing SavedSite name?

Thanks,
Nikesh

Reply with quote E-mail

Advertisement

Advertisement

You can post new topics in this forum