LinuxAdminConnectionFactory.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. namespace Renci.SshNet.IntegrationTests
  2. {
  3. public class LinuxAdminConnectionFactory : IConnectionInfoFactory
  4. {
  5. private readonly string _host;
  6. private readonly int _port;
  7. public LinuxAdminConnectionFactory(string sshServerHostName, ushort sshServerPort)
  8. {
  9. _host = sshServerHostName;
  10. _port = sshServerPort;
  11. }
  12. public ConnectionInfo Create()
  13. {
  14. var user = Users.Admin;
  15. return new ConnectionInfo(_host, _port, user.UserName, new PasswordAuthenticationMethod(user.UserName, user.Password));
  16. }
  17. public ConnectionInfo Create(params AuthenticationMethod[] authenticationMethods)
  18. {
  19. throw new NotImplementedException();
  20. }
  21. public ConnectionInfo CreateWithProxy()
  22. {
  23. throw new NotImplementedException();
  24. }
  25. public ConnectionInfo CreateWithProxy(params AuthenticationMethod[] authenticationMethods)
  26. {
  27. throw new NotImplementedException();
  28. }
  29. }
  30. }