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

Issue with Ubuntu 22 which uses latest ssh2 #1358

Open
varunwyest opened this issue Jul 7, 2024 · 5 comments
Open

Issue with Ubuntu 22 which uses latest ssh2 #1358

varunwyest opened this issue Jul 7, 2024 · 5 comments

Comments

@varunwyest
Copy link

Mup version (mup --version):
1.5.10
Mup config

Output of command

Started TaskList: Setup Docker
[20.81.187.213] - Setup Docker
node:events:496
      throw er; // Unhandled 'error' event
      ^

Error: All configured authentication methods failed
    at doNextAuth (C:\Users\varun\AppData\Roaming\nvm\v20.11.0\node_modules\mup\node_modules\ssh2-classic\lib\client.js:413:17)
    at tryNextAuth (C:\Users\varun\AppData\Roaming\nvm\v20.11.0\node_modules\mup\node_modules\ssh2-classic\lib\client.js:484:5)
    at SSH2Stream.onUSERAUTH_FAILURE (C:\Users\varun\AppData\Roaming\nvm\v20.11.0\node_modules\mup\node_modules\ssh2-classic\lib\client.js:597:5)
    at SSH2Stream.emit (node:events:518:28)
    at parsePacket (C:\Users\varun\AppData\Roaming\nvm\v20.11.0\node_modules\mup\node_modules\ssh2-streams\lib\ssh.js:3682:10)
    at SSH2Stream._transform (C:\Users\varun\AppData\Roaming\nvm\v20.11.0\node_modules\mup\node_modules\ssh2-streams\lib\ssh.js:701:13)
    at Transform._write (node:internal/streams/transform:171:8)
    at writeOrBuffer (node:internal/streams/writable:564:12)
    at _write (node:internal/streams/writable:493:10)
    at Writable.write (node:internal/streams/writable:502:10)
    at Socket.ondata (node:internal/streams/readable:1007:22)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
Emitted 'error' event on Client instance at:
    at doNextAuth (C:\Users\varun\AppData\Roaming\nvm\v20.11.0\node_modules\mup\node_modules\ssh2-classic\lib\client.js:415:12)
    at tryNextAuth (C:\Users\varun\AppData\Roaming\nvm\v20.11.0\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:190:23) {
  level: 'client-authentication'
}

Node.js v20.11.0
@timsun28
Copy link

timsun28 commented Aug 4, 2024

To fix this issue you can make the following changes on the server when connected to it through ssh:
Open file /etc/ssh/sshd_config with a text editor like nano.
Add the line PubkeyAcceptedKeyTypes=+ssh-rsa to the end of the file and save
Restart the service sshd with sudo systemctl restart sshd.service or just restart the server.

I haven't found a real fix yet for this package.

@dorianboulch
Copy link

The problem is not from meteor up, but from SSH itself.
ssh-rsa is deprecated because SHA-1 is from now considered as insecured.
You should consider using ED25519 algorithm for your new SSH keys.

@thomastraum
Copy link

thank you! I was stuck on this

ssh-keygen -t ed25519 -C "[email protected]"
ssh-copy-id -i ~/.ssh/id_ed25519.pub yourname@server

one: {
     host: 'yourserver',
     username: 'yourname',
     pem: '~/.ssh/id_ed25519'
   }

@thomastraum
Copy link

actually hours later this wont work, since mup deploy wont auth with node. so @timsun28's workaround seems the right idea

@zodern
Copy link
Owner

zodern commented Oct 9, 2024

We were using a very old ssh client. I wonder if this is any better with [email protected]. Otherwise, maybe we could detect when this issue might be happening and show a more informative message.

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

5 participants