Exemplo n.º 1
0
        public static ISshClientService Create(SshConnectionByPasswordCredentials credentials)
        {
            var service = new SshClientService(credentials);

            service.client.Connect();
            return(service);
        }
Exemplo n.º 2
0
 private SshClientService(SshConnectionByPasswordCredentials credentials)
 {
     client = credentials.Port.HasValue
         ? new SshClient(credentials.Host, credentials.Port.Value, credentials.Username, credentials.Password)
         : new SshClient(credentials.Host, credentials.Username, credentials.Password);
 }