Update SSH client to patched version

This commit is contained in:
2019-11-19 14:52:12 -05:00
parent 51301528df
commit 8763a86840
5 changed files with 19629 additions and 12 deletions
+3 -3
View File
@@ -62,9 +62,9 @@
<HintPath>..\packages\MlkPwgen.0.2.0.0\lib\net45\MlkPwgen.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Renci.SshNet, Version=2013.4.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SSH.NET.2013.4.7\lib\net40\Renci.SshNet.dll</HintPath>
<Private>True</Private>
<Reference Include="Renci.SshNet, Version=2016.1.0.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Renci.SshNet.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
+11 -4
View File
@@ -72,13 +72,20 @@ namespace LeafWeb.Core.Remote
}
}
private void CopyLeafInput(PiscalLeafInput leafInput, string directory)
private void CopyLeafInput(PiscalLeafInput leafInput)
{
// create directory
using (var sshClient = GetSshClient())
{
sshClient.Connect();
var runCommand = sshClient.RunCommand($"mkdir {BaseDirectory}/{leafInput.PiscalDirectoryName}");
sshClient.RunCommand($"mkdir {BaseDirectory}/{leafInput.PiscalDirectoryName}/input");
}
// copy files
using (var scp = GetScpClient())
foreach (var file in leafInput.InputFiles)
{
var inputPath = $"{directory}/input/{file.Filename}";
var inputPath = $"{BaseDirectory}/{leafInput.PiscalDirectoryName}/input/{file.Filename}";
using (var stream = new MemoryStream(file.Contents))
{
_logger.Debug("Copying " + inputPath);
@@ -96,9 +103,9 @@ namespace LeafWeb.Core.Remote
if (string.IsNullOrEmpty(leafInput.PhotosyntheticType))
throw new PiscalClientException(leafInput.LeafInputId, "No PhotosyntheticType set");
var inputDirectory = $"{BaseDirectory}/{leafInput.PiscalDirectoryName}";
//var inputDirectory = $"{BaseDirectory}/{leafInput.PiscalDirectoryName}";
CopyLeafInput(leafInput, inputDirectory);
CopyLeafInput(leafInput);
// begin processing
using (var ssh = GetSshClient())
-1
View File
@@ -7,5 +7,4 @@
<package id="log4net" version="2.0.8" targetFramework="net45" />
<package id="MathNet.Numerics" version="4.5.1" targetFramework="net45" />
<package id="MlkPwgen" version="0.2.0.0" targetFramework="net45" />
<package id="SSH.NET" version="2013.4.7" targetFramework="net45" />
</packages>
Binary file not shown.
File diff suppressed because it is too large Load Diff