예제 #1
0
        public string TestConnection()
        {
            string macAlgos         = string.Join(",", MacAlgorithms.Where(t => t.IsEnabled).Select(t => t.Name));
            string encryptionAlgos  = string.Join(",", EncryptionAlgorithms.Where(t => t.IsEnabled).Select(t => t.Name));
            string compressionAlgos = string.Join(",", CompressionAlgorithms.Where(t => t.IsEnabled).Select(t => t.Name));
            string keyExchangeAlgos = string.Join(",", KeyExchangeAlgorithms.Where(t => t.IsEnabled).Select(t => t.Name));

            return(_sftpClient.TryConnection(ServerAddress, ServerPort, macAlgos, encryptionAlgos, compressionAlgos, keyExchangeAlgos));
        }