liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.5k stars 256 forks source link

Error: All configured authentication methods failed #920

Open ashishk31kumar opened 3 years ago

ashishk31kumar commented 3 years ago

I had done setup VSFTPD server for file transfer in aws and try to connect using the npm module - ssh2-sftp-client , it show a error given below

Error: All configured authentication methods failed at tryNextAuth (/home/ashish/addis/node_modules/ssh2/lib/client.js:392:17) at SSH2Stream.onUSERAUTH_FAILURE (/home/ashish/addis/node_modules/ssh2/lib/client.js:599:5) at emitTwo (events.js:126:13) at SSH2Stream.emit (events.js:214:7) at parsePacket (/home/ashish/addis-pianca/node_modules/ssh2-streams/lib/ssh.js:3930:10) at SSH2Stream._transform (/home/ashish/addis-pianca/node_modules/ssh2-streams/lib/ssh.js:671:13) at SSH2Stream.Transform._read (_stream_transform.js:186:10) at SSH2Stream._read (/home/ashish/addis-pianca/node_modules/ssh2-streams/lib/ssh.js:253:15) at SSH2Stream.Transform._write (_stream_transform.js:174:12) at doWrite (_stream_writable.js:397:12) at writeOrBuffer (_stream_writable.js:383:5) at SSH2Stream.Writable.write (_stream_writable.js:290:11) at Socket.ondata (_stream_readable.js:639:20) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at Socket.Readable.push (_stream_readable.js:208:10) at TCP.onread (net.js:607:20) level: 'client-authentication'

code used to connect the vsftpd server sftp.connect({ host: "3.6.75.65" port: "22" username: "ashish-ftp" password: "***" }).then(() => { console.log("result") }) .catch((err)=>{ console.log("error") })

When connect with filezilla it shows an error Error: FATAL ERROR: No supported authentication methods available (server sent: publickey) Error: Could not connect to server

Please help how to connect the FTP sever using NPM module.

GOinfo-Ltd commented 2 years ago

I've got the same error using the latest vscode insider's build.

I'm using a passkey.

SSHD throws a

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

error

Yet, using the same key, I can SSH to the terminal without any issue...