ERROR: ERR_GENERIC_CLIENT - This service allows sftp connections only
See original GitHub issueI don’t know what needs to be done here!!
sftp.connect({
host: 'host',
port: '22',
username: 'username',
password: 'pass',
debug: myDebug,
})
I am getting the following error.
DEBUG: Parser: IN_PACKETDATAAFTER, packet: USERAUTH_FAILURE
DEBUG: Client: password auth failed
CLIENT[sftp]: Exhausted all connection attempts. Giving up
DEBUG: Outgoing: Writing DISCONNECT (BY_APPLICATION)
Error: connect: All configured authentication methods failed after 2 attempts
at Object.formatError (/Users/XXXX/dev/workspaces/proc-order-sync/node_modules/ssh2-sftp-client/src/utils.js:62:18)
at Client.connectErrorListener (/Users/XXXX/dev/workspaces/proc-order-sync/node_modules/ssh2-sftp-client/src/index.js:98:21)
at Object.onceWrapper (events.js:422:26)
at Client.emit (events.js:315:20)
at doNextAuth (/Users/XXXX/dev/workspaces/proc-order-sync/node_modules/ssh2/lib/client.js:415:12)
at tryNextAuth (/Users/XXXX/dev/workspaces/proc-order-sync/node_modules/ssh2/lib/client.js:484:5)
at SSH2Stream.onUSERAUTH_FAILURE (/Users/XXXX/dev/workspaces/proc-order-sync/node_modules/ssh2/lib/client.js:597:5)
at SSH2Stream.emit (events.js:315:20)
at parsePacket (/Users/XXXX/dev/workspaces/proc-order-sync/node_modules/ssh2-streams/lib/ssh.js:3682:10)
at SSH2Stream._transform (/Users/XXXX/dev/workspaces/proc-order-sync/node_modules/ssh2-streams/lib/ssh.js:701:13) {
code: 'ERR_GENERIC_CLIENT',
custom: true
It looks like authentication is failing, although I can successfully connect with the same information using CyberDuck a MAC OS app.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
SSH on but unable to connect (says only sftp) - Ask Ubuntu
This message from ssh : This service allows sftp connections only. Connection to <host> closed. is typical of this configuration in ...
Read more >Locked myself out of Amazon EC2 SSH - This service allows ...
I get the following response: This service allows sftp connections only. Connection to [hostname] closed. I've successfully removed ForceCommand ...
Read more >Connecting to a SFTP server with ssh2-sftp-client in a AWS ...
As mentioned by @Atef before the problem was that the SFTP Server is hosted outside of AWS and only granted access to whitelisted...
Read more >SFTP Chroot Jail preventing SSH: This service allows sftp ...
This service allows sftp connections only. The usual culprit to this problem appears to occur when the sysadmin leaves ForceCommand ...
Read more >Connect with a user in SFTP and SSH
The test gives : This service allows sftp connections only. Is it possible to run both ? I don't quite know what to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I got it fixed by doing the following:
and
Well, all I can say is I’ve never needed to do that and all the ftp servers I’ve communicated with work fine. It could be that the remote server is configured to only allow authentication from the keyboard (which would be unusual). It certainly isn’t a ‘normal’ setup, but if it works…
– Tim Cross