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

Unable to connect using ssh keys #1

Open
vladaman opened this issue Apr 19, 2023 · 0 comments
Open

Unable to connect using ssh keys #1

vladaman opened this issue Apr 19, 2023 · 0 comments

Comments

@vladaman
Copy link

I am unable to connect using private key

node version: v16.15.0
gulp-scp3 version: 0.0.4
ssh2 module version: ~0.8.6

Possibly related to mscdex/ssh2#989

Error:

Error: All configured authentication methods failed
    at doNextAuth (/me/main/master/node_modules/gulp-scp3/node_modules/ssh2/lib/client.js:413:17)
    at tryNextAuth (/me/main/master/node_modules/gulp-scp3/node_modules/ssh2/lib/client.js:484:5)
    at SSH2Stream.onUSERAUTH_FAILURE (/me/main/master/node_modules/gulp-scp3/node_modules/ssh2/lib/client.js:597:5)
    at SSH2Stream.emit (node:events:527:28)
    at SSH2Stream.emit (node:domain:537:15)
    at parsePacket (/me/main/master/node_modules/gulp-scp3/node_modules/ssh2-streams/lib/ssh.js:3682:10)
    at SSH2Stream._transform (/me/main/master/node_modules/gulp-scp3/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) {
  level: 'client-authentication'

Server reports following error:

userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth]

Gulp:

return gulp.src(globs)
        .pipe(scp({
            host: 'xxx',
            port: 22,
            username: 'ubuntu',
            dest: '/tmp',
            privateKey: fs.readFileSync('/me/.ssh/id_rsa'),
            publicKey: fs.readFileSync('/me/.ssh/id_rsa.pub')
        }))
        .on('error', function(err) {
            console.log(err);
        });
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

1 participant