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

MUP 1.5.8 won't connect to an EC2 instance running 22.04 using .pem #1318

Open
julienfdev opened this issue May 24, 2022 · 4 comments
Open
Labels

Comments

@julienfdev
Copy link

Hello team !

MUP won't connect through SSH to an EC2 instance running Ubuntu 22.04, running the same command on the same instance config, only running a 20.04 succeed :

Mup version (mup --version): 1.5.8

Mup config, interesting bit :
module.exports = {
servers: {
one: {
"host": "ec2-xx-xx-xx-xx.eu-west-3.compute.amazonaws.com",
"username": "ubuntu",
"pem": "./debug-meteor.pem",
}
},

Output of command :

Started TaskList: Setup Docker
[ec2-13-xx-xx-xxx.eu-west-3.compute.amazonaws.com] - Setup Docker
node:events:368
      throw er; // Unhandled 'error' event
      ^

Error: All configured authentication methods failed
    at doNextAuth (/Users/julien/.nvm/versions/node/v16.13.1/lib/node_modules/mup/node_modules/ssh2-classic/lib/client.js:413:17)
    at tryNextAuth (/Users/julien/.nvm/versions/node/v16.13.1/lib/node_modules/mup/node_modules/ssh2-classic/lib/client.js:484:5)
    at SSH2Stream.onUSERAUTH_FAILURE (/Users/julien/.nvm/versions/node/v16.13.1/lib/node_modules/mup/node_modules/ssh2-classic/lib/client.js:597:5)
    at SSH2Stream.emit (node:events:390:28)
    at parsePacket (/Users/julien/.nvm/versions/node/v16.13.1/lib/node_modules/mup/node_modules/ssh2-streams/lib/ssh.js:3682:10)
    at SSH2Stream._transform (/Users/julien/.nvm/versions/node/v16.13.1/lib/node_modules/mup/node_modules/ssh2-streams/lib/ssh.js:701:13)
    at SSH2Stream.Transform._write (node:internal/streams/transform:184:23)
    at writeOrBuffer (node:internal/streams/writable:389:12)
    at _write (node:internal/streams/writable:330:10)
    at SSH2Stream.Writable.write (node:internal/streams/writable:334:10)
    at Socket.ondata (node:internal/streams/readable:754:22)
    at Socket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:199:23)
Emitted 'error' event on Client instance at:
    at doNextAuth (/Users/julien/.nvm/versions/node/v16.13.1/lib/node_modules/mup/node_modules/ssh2-classic/lib/client.js:415:12)
    at tryNextAuth (/Users/julien/.nvm/versions/node/v16.13.1/lib/node_modules/mup/node_modules/ssh2-classic/lib/client.js:484:5)
    [... lines matching original stack trace ...]
    at TCP.onStreamRead (node:internal/stream_base_commons:199:23) {
  level: 'client-authentication'
}

This is no problem for the same instance, in the same subnet, with the same permissions and security groups, only running ubuntu 20.04

Cheers !

@zodern zodern added the Bug label May 24, 2022
@gerwinbrunner
Copy link

Yeah, I have the similar problem with another 18.04 LTS works 22.04 LTS does not work.
Any idea?

@jankapunkt
Copy link

also doesn't work with ssh keys in the keyring:

  servers: {
    one: {
      host: 'xxx.xxx.xxx.xxx', // ip to machine
      username: 'someuser'
    }
  },

manual ssh via ssh someuser@xxx.xxx.xxx.xxx works. Server us Ubuntu 22.04

@jankapunkt
Copy link

jankapunkt commented Jun 30, 2022

Seems to come from an issue with ssh2.

There is a quick fix (at least for my use-case with public keys) but you need to do it manually on the target server: mscdex/ssh2#989 (comment)

cc @julienfdev @gerwinbrunner

@hwillson
Copy link

The workaround is also mentioned here: #974 (comment)

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

No branches or pull requests

5 participants