Можно ли заменить [user / pw acces sftp] на [Key access SSH] в программе .NET? - PullRequest
0 голосов
/ 08 ноября 2019

Я хочу знать, если возможно, чтобы заменить мои доступы именем пользователя и паролем: SFTP с доступом с ключом SSH, в программе .NET,

string slogPath = string.IsNullOrEmpty(sLocalPathLogFile) ? System.AppDomain.CurrentDomain.BaseDirectory : sLocalPathLogFile;

if (!initFicLog(slogPath, "TransportFTP_" + sFlow + "_B1"))
{
    ClsLogMess.TraceMess(" Impossible de creer LOG stockés dans " + slogPath, isConsole);
}

// Console.WriteLine("{0} Démarrage Recherche nouveaux fichiers ", DateTime.Now.ToString("YYYY-MM-DD hh:mm:dd"));
// Set Init value
sFtpServer = Properties.Settings.Default.FtpServer;
sFtpUser = Properties.Settings.Default.FtpUser;
sFtpPassword = Properties.Settings.Default.FtpPassword;
sFtpPort = Properties.Settings.Default.FtpPort;
...