Quantcast
Channel: SSH.NET Library
Viewing all 2955 articles
Browse latest View live

New Post: Bug in SftpClient dispose

$
0
0
Hi Oleg,

I found a bug in how you are handling disposing of SftpClient (and possibly other clients). In short I use SftpClient in a using{} block, during Dispose it is possible that an Exception can occur closing the Channel (e.g. SocketException), which lead to not setting GC.SuppressFinalize and eventually the objects will be GC'd by the framework which leads to another exception being thrown, one which I am obviously unable to catch.

Here is the stack trace of the exception being thrown during standard Dispose from using{} block (note this exception I'm catching at the moment):
   System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
   at Renci.SshNet.Session.SocketWrite(Byte[] data) in d:\Temp\sshnet-22965\Renci.SshClient\Renci.SshNet\Session.NET.cs:line 178
   at Renci.SshNet.Session.SendMessage(Message message) in d:\Temp\sshnet-22965\Renci.SshClient\Renci.SshNet\Session.cs:line 742
   at Renci.SshNet.Channels.Channel.Close(Boolean wait) in d:\Temp\sshnet-22965\Renci.SshClient\Renci.SshNet\Channels\Channel.cs:line 523
   at Renci.SshNet.Channels.ChannelSession.Close(Boolean wait) in d:\Temp\sshnet-22965\Renci.SshClient\Renci.SshNet\Channels\ChannelSession.cs:line 108
   at Renci.SshNet.Channels.Channel.Dispose(Boolean disposing) in d:\Temp\sshnet-22965\Renci.SshClient\Renci.SshNet\Channels\Channel.cs:line 706
   at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean disposing) in d:\Temp\sshnet-22965\Renci.SshClient\Renci.SshNet\SubsystemSession.cs:line 224
   at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean disposing) in d:\Temp\sshnet-22965\Renci.SshClient\Renci.SshNet\Sftp\SftpSession.cs:line 234
   at Renci.SshNet.SftpClient.Dispose(Boolean disposing) in d:\Temp\sshnet-22965\Renci.SshClient\Renci.SshNet\SftpClient.cs:line 1578
   at Renci.SshNet.BaseClient.Dispose() in d:\Temp\sshnet-22965\Renci.SshClient\Renci.SshNet\BaseClient.cs:line 210
And here is the exception that follows when .NET does it's garbage collection on this same SftpClient (this exception I cannot catch):
Exception Info: Renci.SshNet.Common.SshConnectionException
Stack:
   at Renci.SshNet.Session.SendMessage(Renci.SshNet.Messages.Message)
   at Renci.SshNet.Channels.Channel.Close(Boolean)
   at Renci.SshNet.Channels.ChannelSession.Close(Boolean)
   at Renci.SshNet.Channels.Channel.Dispose(Boolean)
   at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean)
   at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean)
   at Renci.SshNet.Sftp.SubsystemSession.Finalize()

New Post: Bug in SftpClient dispose

New Post: su command

$
0
0
hi vaccaridaniele,

why do you use this regular expressions? Look at my code at the end of this posting. It is just an adapted copy of yours. ;) But it runs endless the while loop.
            var connectionInfo = new ConnectionInfo("server", 22, "user",
                new PrivateKeyAuthenticationMethod("user",
                     new PrivateKeyFile(File.OpenRead(@"C:\Path\to\file\file.key"), "")));

            using (var client = new Renci.SshNet.SshClient(connectionInfo))
          {
              try
              {
                  client.Connect();
                  ShellStream shells = client.CreateShellStream("test", 80, 24, 800, 600, 1024);
                  Regex regex = new Regex(@"\[.*@.*\][\$|\#]");

                  shells.WriteLine("su");
                  String outp = "";
                  var match = regex.Match(outp);

                  while ((shells.DataAvailable || !match.Success || outp == ""))
                  {

                      outp += shells.Read();
                      Console.WriteLine(outp);
                      match = regex.Match(outp); 
                      Console.WriteLine(shells.DataAvailable);
                      Console.WriteLine(match.Success);
                  }
                 shells.WriteLine("password");
                  outp = "";
                  match = regex.Match(outp);
                  while (shells.DataAvailable || !match.Success || outp == "")
                  {
                      outp += shells.Read();
                      Console.WriteLine(outp);
                      match = regex.Match(outp);
                  }
                  client.Disconnect();
              }
              catch (SshAuthenticationException ex)
              {
                  Console.WriteLine(ex.Message);
              }

New Post: why there is nothing in your help documentation

$
0
0
why there is nothing in your help documentation

New Post: why there is nothing in your help documentation

$
0
0
Hi,

What do you mean by nothing?

Thanks,
Oleg

New Post: why there is nothing in your help documentation

$
0
0
I downloaded your help document, only have catalogue, but no any content, it is empty.

New Post: why there is nothing in your help documentation

$
0
0
Hi,
Please read how to unblock content here.

Its known windows behavior.

Thanks,
Oleg

Commented Issue: Process terminated due to unhandled exception in Finalize / Destructor [1514]

$
0
0
__My application encountered the following unhandled exception that caused the process to exit:__

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Renci.SshNet.Common.SshConnectionException
Stack:
at Renci.SshNet.Session.SendMessage(Renci.SshNet.Messages.Message)
at Renci.SshNet.Channels.Channel.SendMessage(Renci.SshNet.Messages.Connection.ChannelCloseMessage)
at Renci.SshNet.Channels.Channel.Close(Boolean)
at Renci.SshNet.Channels.ChannelSession.Close(Boolean)
at Renci.SshNet.Channels.Channel.Dispose(Boolean)
at Renci.SshNet.Channels.ChannelSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SubsystemSession.Finalize()

__This occurred just over 60 seconds _after_ the Dispose method on SftpClient was called which generated a very similar exception (handled and logged by my code):__

2013-02-16 15:41:32.9693 Error SftpFileTransfer Renci.SshNet.Common.SshConnectionException,Client not connected., at Renci.SshNet.Session.SendMessage(Message message)
at Renci.SshNet.Channels.Channel.SendMessage(ChannelCloseMessage message)
at Renci.SshNet.Channels.Channel.Close(Boolean wait)
at Renci.SshNet.Channels.ChannelSession.Close(Boolean wait)
at Renci.SshNet.Channels.Channel.Dispose(Boolean disposing)
at Renci.SshNet.Channels.ChannelSession.Dispose(Boolean disposing)
at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean disposing)
at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean disposing)
at Renci.SshNet.SftpClient.Dispose(Boolean disposing)
at Renci.SshNet.BaseClient.Dispose()
at BusinessObjects.SftpFileTransfer.DownloadFiles()


__It looks like ~SubsystemSession() is causing an attempt to send a message over the channel(!) due to the chaining of calls to the various Dispose() methods.__
Comments: ** Comment from web user: SergeyOsten **

I have same problem .
public void Put()
{
using (var sftp = new SftpClient("127.0.0.1", 2222, "**", "123"))
{
try
{
sftp.Connect();
using (var streamFile = File.OpenRead(@"C:\temp\1\as1d_6.txt"))
{
sftp.UploadFile(streamFile, "/qq/1s.txt");
}

sftp.Disconnect();

}

catch (Exception ex)
{
textBox1.Text = ex.Message;
}
finally
{
if (sftp != null)
{
sftp.Disconnect();
sftp.Dispose();
}
}
}
}
when sftp server down I have unhadled exception

shNet.Common.SshConnectionException: Client not connected.
at Renci.SshNet.Session.SendMessage(Message message)
at Renci.SshNet.Channels.Channel.SendMessage(ChannelCloseMessage message)
at Renci.SshNet.Channels.Channel.Close(Boolean wait)
at Renci.SshNet.Channels.ChannelSession.Close(Boolean wait)
at Renci.SshNet.Channels.Channel.Dispose(Boolean disposing)
at Renci.SshNet.Channels.ChannelSession.Dispose(Boolean disposing)
at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean disposing)
at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean disposing)
at Renci.SshNet.SftpClient.Dispose(Boolean disposing)
at Renci.SshNet.BaseClient.Finalize()


Commented Issue: Process terminated due to unhandled exception in Finalize / Destructor [1514]

$
0
0
__My application encountered the following unhandled exception that caused the process to exit:__

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Renci.SshNet.Common.SshConnectionException
Stack:
at Renci.SshNet.Session.SendMessage(Renci.SshNet.Messages.Message)
at Renci.SshNet.Channels.Channel.SendMessage(Renci.SshNet.Messages.Connection.ChannelCloseMessage)
at Renci.SshNet.Channels.Channel.Close(Boolean)
at Renci.SshNet.Channels.ChannelSession.Close(Boolean)
at Renci.SshNet.Channels.Channel.Dispose(Boolean)
at Renci.SshNet.Channels.ChannelSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SubsystemSession.Finalize()

__This occurred just over 60 seconds _after_ the Dispose method on SftpClient was called which generated a very similar exception (handled and logged by my code):__

2013-02-16 15:41:32.9693 Error SftpFileTransfer Renci.SshNet.Common.SshConnectionException,Client not connected., at Renci.SshNet.Session.SendMessage(Message message)
at Renci.SshNet.Channels.Channel.SendMessage(ChannelCloseMessage message)
at Renci.SshNet.Channels.Channel.Close(Boolean wait)
at Renci.SshNet.Channels.ChannelSession.Close(Boolean wait)
at Renci.SshNet.Channels.Channel.Dispose(Boolean disposing)
at Renci.SshNet.Channels.ChannelSession.Dispose(Boolean disposing)
at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean disposing)
at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean disposing)
at Renci.SshNet.SftpClient.Dispose(Boolean disposing)
at Renci.SshNet.BaseClient.Dispose()
at BusinessObjects.SftpFileTransfer.DownloadFiles()


__It looks like ~SubsystemSession() is causing an attempt to send a message over the channel(!) due to the chaining of calls to the various Dispose() methods.__
Comments: ** Comment from web user: SergeyOsten **

how i can change impact on high?

Commented Issue: Process terminated due to unhandled exception in Finalize / Destructor [1514]

$
0
0
__My application encountered the following unhandled exception that caused the process to exit:__

Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Renci.SshNet.Common.SshConnectionException
Stack:
at Renci.SshNet.Session.SendMessage(Renci.SshNet.Messages.Message)
at Renci.SshNet.Channels.Channel.SendMessage(Renci.SshNet.Messages.Connection.ChannelCloseMessage)
at Renci.SshNet.Channels.Channel.Close(Boolean)
at Renci.SshNet.Channels.ChannelSession.Close(Boolean)
at Renci.SshNet.Channels.Channel.Dispose(Boolean)
at Renci.SshNet.Channels.ChannelSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean)
at Renci.SshNet.Sftp.SubsystemSession.Finalize()

__This occurred just over 60 seconds _after_ the Dispose method on SftpClient was called which generated a very similar exception (handled and logged by my code):__

2013-02-16 15:41:32.9693 Error SftpFileTransfer Renci.SshNet.Common.SshConnectionException,Client not connected., at Renci.SshNet.Session.SendMessage(Message message)
at Renci.SshNet.Channels.Channel.SendMessage(ChannelCloseMessage message)
at Renci.SshNet.Channels.Channel.Close(Boolean wait)
at Renci.SshNet.Channels.ChannelSession.Close(Boolean wait)
at Renci.SshNet.Channels.Channel.Dispose(Boolean disposing)
at Renci.SshNet.Channels.ChannelSession.Dispose(Boolean disposing)
at Renci.SshNet.Sftp.SubsystemSession.Dispose(Boolean disposing)
at Renci.SshNet.Sftp.SftpSession.Dispose(Boolean disposing)
at Renci.SshNet.SftpClient.Dispose(Boolean disposing)
at Renci.SshNet.BaseClient.Dispose()
at BusinessObjects.SftpFileTransfer.DownloadFiles()


__It looks like ~SubsystemSession() is causing an attempt to send a message over the channel(!) due to the chaining of calls to the various Dispose() methods.__
Comments: ** Comment from web user: BeyersCronje **

Yep I also have the same issue. See this [discussion thread](http://sshnet.codeplex.com/discussions/435430) for more info.

I would also say the impact of this bug is quite high as it causes the whole app to crash.

Commented Issue: SCP : Missing files when using DirectoryUpload [1382]

$
0
0
Hi,I have the following environment:- Win7 / 64- .NET 3.5- MPC-Target :OpenSSH_6.0p1, OpenSSL 1.0.0j 10 May 2012- SSH.NET commit 19813I want to upload a directory structure (recursive, depth = 2) from the PC to a MPC basedLinux remote system. The total amount of data is about 8MB with 23 files from55 bytes to 4MB.Calling mScp.Upload(new DirectoryInfo(localDir), remoteDir) does not result anyerror and the Uploading event shoes uploading all files. But after Upload() returnedThere are a random number of missing files on the target (between 1 and 5).It tried the same with a PC based Linux as target what resulted in the same behaviour(OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011). It seems theproblem is caused anywhere within SSH.NET.Does anyone have a solution?Extension:I tried to workaround by replacing Upload(new DirectoryInfo(...)) by several singlecalls of Upload(new FileInfo(...)). This worked but is too slow for my application.
Comments: ** Comment from web user: TheCloudlessSky **

Oleg,

Any chance of getting this fixed? This has completely blocked us from using your library and we've had to resolve to using the old Tamir.SharpSSH library that is *terribly* slow!

Commented Issue: SCP : Missing files when using DirectoryUpload [1382]

$
0
0
Hi,I have the following environment:- Win7 / 64- .NET 3.5- MPC-Target :OpenSSH_6.0p1, OpenSSL 1.0.0j 10 May 2012- SSH.NET commit 19813I want to upload a directory structure (recursive, depth = 2) from the PC to a MPC basedLinux remote system. The total amount of data is about 8MB with 23 files from55 bytes to 4MB.Calling mScp.Upload(new DirectoryInfo(localDir), remoteDir) does not result anyerror and the Uploading event shoes uploading all files. But after Upload() returnedThere are a random number of missing files on the target (between 1 and 5).It tried the same with a PC based Linux as target what resulted in the same behaviour(OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011). It seems theproblem is caused anywhere within SSH.NET.Does anyone have a solution?Extension:I tried to workaround by replacing Upload(new DirectoryInfo(...)) by several singlecalls of Upload(new FileInfo(...)). This worked but is too slow for my application.
Comments: ** Comment from web user: olegkap **

Hey guys,
I briefly looked at it but under one scenario that I checked it worked so I think what happens here is that I need to think about all possible scenarios and address them appropriately.

I guess I might look into Tamir library for solution example but unfortunately I don't have much free time right now.

I will defiantly will try to fix it as soon as possible.

Thanks,
Oleg

Commented Issue: SCP : Missing files when using DirectoryUpload [1382]

$
0
0
Hi,I have the following environment:- Win7 / 64- .NET 3.5- MPC-Target :OpenSSH_6.0p1, OpenSSL 1.0.0j 10 May 2012- SSH.NET commit 19813I want to upload a directory structure (recursive, depth = 2) from the PC to a MPC basedLinux remote system. The total amount of data is about 8MB with 23 files from55 bytes to 4MB.Calling mScp.Upload(new DirectoryInfo(localDir), remoteDir) does not result anyerror and the Uploading event shoes uploading all files. But after Upload() returnedThere are a random number of missing files on the target (between 1 and 5).It tried the same with a PC based Linux as target what resulted in the same behaviour(OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011). It seems theproblem is caused anywhere within SSH.NET.Does anyone have a solution?Extension:I tried to workaround by replacing Upload(new DirectoryInfo(...)) by several singlecalls of Upload(new FileInfo(...)). This worked but is too slow for my application.
Comments: ** Comment from web user: TheCloudlessSky **

Oleg,

I *think* having multiple nested directories/files might be the cause of this. I really do appreciate a fix for this when you have the time. Cheers!

New Post: scp odd behavior

$
0
0
I'm able to login to a server and execute scp commands using your library. I'm getting a weird behavior on upload. I need to upload a file to a folder off of the root called "in", but when I perform the upload command and setting the destination to "/in/testfile.txt" it gives me an "ambigous target" error. If I use "in/testfile.txt" it creates the file, but does so by creating a second in folder and putting the text file in there resulting in the file beingn in "/in/in/testfile.txt". Here is my code
    public string putfile()
    {
        string status = "success";
        string testfile = Server.MapPath("/App_Data/test2.txt");
        string destfile = "in/" + Path.GetFileName(testfile);
        try
        {
            var conn = connect3();
            ScpClient m_scpclient = new ScpClient("192.168.0.0.1", 22, "username", new PrivateKeyFile(File.OpenRead(@"C:\keys\myprivatekey.ppk"), "keyphrase"));
            //SftpClient m_sftpclient = new SftpClient(conn);
            m_scpclient.Connect();
            //m_sftpclient.Connect();
            if (m_scpclient.IsConnected)
            {
                status = destfile;
                
                m_scpclient.Upload(File.OpenRead(testfile), destfile);
                //m_scpclient.Upload(File.OpenRead(testfile), @"\in\" + Path.GetFileName(testfile));
            }
            else
            {
                status = "disconnected";
            }
        }
        catch (Exception ex)
        {
            status = ex.ToString() + destfile + testfile;
        }
        return status;
    }

any help figuring this out would be greatly appreciated. I've tried several differentn combinations of backslashes, using "..\", "../". Everything gives the ambigous target error except the version that creates the duplicated directory. If I try it with just the file name it gives me an error because I don't have permissions to deposit files in the root.

New Post: scp odd behavior

$
0
0
Hi,

Unfortunately I do have some problems with SCP right now.

I am planning to review this client as soon as I have more time since I have few more related issues.

Thanks,
Oleg

New Post: scp odd behavior

$
0
0
okay... I can probably deal with this for now, but would be nice if I could figure out how to stop this behavior!

Commented Issue: Dispose() should not leave running threads behind! [1436]

$
0
0
Hi. I have found a really hard to find bug that is very consistently repeatable. Before getting into the details, I think it should be noted that this issue will be resolved if the Renci.SshNet.SshClient.Dispose() and the Renci.SshNet.ForwardedPortLocal.Dispose() (and anything else) actually and honestly dispose everything. But the problem is that after calling those, there are still threads hanging around doing stuff and sometimes they get stuck badly. It looks like someone went crazy with anonymous methods and launching Thread Tasks without leaving a handle to the Thread for management by the parents to kill them when disposed. And I found in Session.NET40.cs this line: Task.Factory.StartNew(action, TaskCreationOptions.LongRunning);which I changed to: Task.Factory.StartNew(action, TaskCreationOptions.AttachedToParent);but it had no positive impact.I have seen posts on this site about Disconnect doing funny stuff and also about the Timeouts not seeming to disconnect things, and some other things like that. I bet they are related to getting over your head in multi-threading or events.The result is that sometimes I still have the process listening on the local port way after the Dispose() is called. And also the Connection is sitting there too. Usually this happens when eliminating both the Forwards and the Connection, but sometimes even just the Forwards. The call to the Forward's Disconnect() and Dispose() when the problem happens will take a much longer time, but then sadly continue going after seemingly giving up.When I pause I can see 2 Renci threads hanging around and stuck at these points:ForwardedPortLocal.NET.cs line 34: var socket = this._listener.AcceptSocket();Session.cs line 1575: var message = this.ReceiveMessage();I have tested this A LOT!!! trying to find ways around it. It happens in the code base (pulled today 12/5/12), it happens in .Net 4.0 DLL from a month ago, and it happens from .Net 3.5 DLL pulled today also. Another result is that sometimes the situation causes the app to die a horrible death with:System.AggregateException was unhandled Message=A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. Source=mscorlib StackTrace: at System.Threading.Tasks.TaskExceptionHolder.Finalize() InnerException: System.NullReferenceException Message=Object reference not set to an instance of an object. Source=Renci.SshNet StackTrace: at Renci.SshNet.ForwardedPortLocal.b__0() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute()WHEN DOES THIS HAPPEN:Here is the kicker. I wrote an app to manage SSH tunnels. And when I first was having problems with Renci, I made it so I can implement other libraries and other means. Via a config file I can add and remove tunnels and have multiple connections. The process reads the config file periodically and applies the changes found. So I can have a connection using Renci, another using Chilkat, another using Plink, Tunnelier, and that's all I finished implementing so far.If I have all Renci connections, it seems that I can add and remove tunnels and connections a bunch of times and not have an issue. (however usually there is a Connection (SshClient) that hangs around in CLOSE_WAIT state). If I bring say Chilkat into the mix, things still are OK.. and I can replace all active connections to one of the other implementations.The problems start happening when I bring in Plink or Tunnelier. They are launched using System.Process. They close themselves properly from what I see in memory and via TCP connections and SSH server. When I have a Renci and Plink (let's say) connection, it is then that if I start removing tunnels from Renci I might have issues. If I start removing the Connection, I almost always have an issue.The issue is that when Renci is told to close up shop, it stalls for a while, and then the code moves on while leaving the listeners in place (though of course not working). And they stay there it seems indefinitely. And I'm also using System.Net.NetworkInformation.IPGlobalProperties.GetIPGlobalProperties().GetActiveTcpListeners() to look at the listeners and it's there. It's because there are those silly Renci threads that are hanging around for some reason trying to read from the socket.And I have verified that the Connection replacement (like Plink) is not actually opening up that tunnel. I have my app now specifically checks for the Active listeners before moving tunnels to another connection.This may be a very complicated specific bug to find, but I think the real root of the problem and the much easier one to fix, is that when you Dispose(), it really should be DISPOSED, leaving no threads behind. I have also verified that calling SshClient.Dispose() does not DISCONNECT, so you have to call both. I think also similar thing with the Forward.. if you don't call Stop().This is how I stop the connections and port forwards: foreach (ForwardedPort forward in this.sshConnection.ForwardedPorts.ToList()) { this.sshConnection.RemoveForwardedPort(forward); Console.WriteLine("just finished removing tunnel"); } this.sshConnection.Disconnect(); Console.WriteLine("just finished conn Disconnect()"); this.sshConnection.Dispose(); Console.WriteLine("just finished conn Dispose()"); public void Dispose() { if (this.localForward != null) { this.localForward.Stop(); Console.WriteLine("just finished tunnel Stop()"); this.localForward.Dispose(); Console.WriteLine("just finished tunnel Disconnect()"); //System.Threading.Thread.Sleep(2000); } }
Comments: ** Comment from web user: olegkap **

Hi,

Can you give it another try?
I just committed 23481 code where I fixed 2 possible issues for leaving thread running in port forwarding scenario.

Can you try it again and see if it was fixed in your situation?

Thanks,
Oleg

New Post: Dynamic PortForward Problem

$
0
0
Hi,

What do you use for web address?

It seems that you using not valid url that cannot be parsed by OS and I am simply forwarding this exception back to you.
For example, see this post

Thanks,
Oleg

Closed Issue: SFTP default path [1403]

$
0
0
Can sftp.BeginUploadFile etc be made to accept the default (SFTP Server) path. I don't see why you should be forced to set it.
Comments: No response and looks like its not an issue

Closed Issue: The proccess stuck on the command UploadFile [1303]

$
0
0
Hi when I Using this Code In VS2010 it's Work fine, But when I run it outside VS2010the proccess stuck on the command UploadFile and I need to stop the proccess, and I can seethat the file uploaded to the server sftp.Connect();  using (var file = File.OpenRead(localFileName)) { sftp.UploadFile(remoteFileName, file); }  sftp.Disconnect(); and there is no exception. Any suggestion? Thanks
Comments: No response, assumed fixed
Viewing all 2955 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>