Skip to content

Commit 467dab7

Browse files
author
Lee Fine
committed
1 parent 178d657 commit 467dab7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

RemoteFile/RemoteHandlers/SSHHandler.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ public override void UploadCertificateFile(string path, string fileName, byte[]
176176
try
177177
{
178178
_logger.LogDebug($"SCP connection attempt to {Connection.Host} using login {Connection.Username} and connection method {Connection.AuthenticationMethods[0].Name}");
179+
client.OperationTimeout = System.TimeSpan.FromSeconds(60);
179180
client.Connect();
180181

181182
using (MemoryStream stream = new MemoryStream(certBytes))
@@ -207,6 +208,7 @@ public override void UploadCertificateFile(string path, string fileName, byte[]
207208
try
208209
{
209210
_logger.LogDebug($"SFTP connection attempt to {Connection.Host} using login {Connection.Username} and connection method {Connection.AuthenticationMethods[0].Name}");
211+
client.OperationTimeout = System.TimeSpan.FromSeconds(60);
210212
client.Connect();
211213

212214
using (MemoryStream stream = new MemoryStream(certBytes))
@@ -265,6 +267,7 @@ public override byte[] DownloadCertificateFile(string path)
265267
try
266268
{
267269
_logger.LogDebug($"SCP connection attempt from {Connection.Host} using login {Connection.Username} and connection method {Connection.AuthenticationMethods[0].Name}");
270+
client.OperationTimeout = System.TimeSpan.FromSeconds(60);
268271
client.Connect();
269272

270273
using (MemoryStream stream = new MemoryStream())
@@ -297,6 +300,7 @@ public override byte[] DownloadCertificateFile(string path)
297300
try
298301
{
299302
_logger.LogDebug($"SFTP connection attempt from {Connection.Host} using login {Connection.Username} and connection method {Connection.AuthenticationMethods[0].Name}");
303+
client.OperationTimeout = System.TimeSpan.FromSeconds(60);
300304
client.Connect();
301305

302306
using (MemoryStream stream = new MemoryStream())

0 commit comments

Comments
 (0)