Beispiel #1
0
 /// <summary>
 /// 建立SFTP连接
 /// </summary>
 private void CreateConnectSFTP()
 {
     try
     {
         _session.connect();
         _channel = _session.openChannel("sftp");
         _channel.connect();
         _channelSftp = (ChannelSftp)_channel;
     }
     catch
     {
         throw;
     }
 }
Beispiel #2
0
 /// <summary>
 /// 建立SFTP连接
 /// </summary>
 private void CreateConnectSFTP()
 {
     try
     {
         _session.connect();
         _channel = _session.openChannel("sftp");
         _channel.connect();
         _channelSftp = (ChannelSftp)_channel;
     }
     catch (Exception e)
     {
         _log.Error("连接SFTP失败!", e);
     }
 }