Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does SSH connection works for user/password method? #170

Open
SquirrelCorporation opened this issue May 1, 2024 · 1 comment
Open

Comments

@SquirrelCorporation
Copy link

Hi,

Kind of a silly question, but I cannot connect to remote server with SSH with a user / password, and cannot figure out why.
Can anyone help me figure it out?

Here is my conf:

 const options: Dockerode.DockerOptions = {};
 options.protocol = 'ssh';
    options.port = 22;
    options.username = this.configuration.username;
    options.host = this.configuration.host;
    options.sshOptions = {
     // tryKeyboard: true,
      host: this.configuration.host,
      port: this.configuration.port,
      username: this.configuration.username,
      password: this.configuration.password,
      debug: (message) => {
        logger.error(message);
      },
    };
    logger.info(options);
    this.dockerApi = new Dockerode(options);

Logs of debug method:

server-1   | [19:05:41.501] ERROR (805): Verifying signature ...
server-1   | [19:05:41.502] ERROR (805): Verified signature
server-1   | [19:05:41.502] ERROR (805): Handshake completed
server-1   | [19:05:41.502] ERROR (805): Outbound: Sending SERVICE_REQUEST (ssh-userauth)
server-1   | [19:05:41.502] ERROR (805): Inbound: Received EXT_INFO
server-1   | [19:05:41.503] ERROR (805): Inbound: Received SERVICE_ACCEPT (ssh-userauth)
server-1   | [19:05:41.503] ERROR (805): Outbound: Sending USERAUTH_REQUEST (none)
server-1   | [19:05:41.505] ERROR (805): Inbound: Received SERVICE_ACCEPT (ssh-userauth)
server-1   | [19:05:41.505] ERROR (805): Outbound: Sending USERAUTH_REQUEST (none)
server-1   | [19:05:41.516] ERROR (805): Inbound: Received USERAUTH_FAILURE (publickey,password)
server-1   | [19:05:41.516] ERROR (805): Client: none auth failed
server-1   | [19:05:41.516] ERROR (805): Outbound: Sending USERAUTH_REQUEST (keyboard-interactive)
server-1   | [19:05:41.518] ERROR (805): Inbound: Received USERAUTH_FAILURE (publickey,password)
server-1   | [19:05:41.518] ERROR (805): Client: none auth failed
server-1   | [19:05:41.518] ERROR (805): Outbound: Sending USERAUTH_REQUEST (keyboard-interactive)
server-1   | [19:05:41.529] ERROR (805): Inbound: Received USERAUTH_FAILURE (publickey,password)
server-1   | [19:05:41.529] ERROR (805): Client: keyboard-interactive auth failed
server-1   | [19:05:41.530] ERROR (805): Outbound: Sending DISCONNECT (11)

@SquirrelCorporation
Copy link
Author

@apocas 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants