Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Sftp unable to login persistent errors either with ssh key or password

  • #6124
    Avatar photo[anonymous]

    Till now I was using Publii with normal ftp on a cdn storage, where the upload worked always.

    Now I wanted to move to my own server as some countries are blocking that cdn’s servers.

    On own servers, normal sftp clients are connecting fine with both ssh key or password. But Publii always says, “unable to connect”.

    It connected for sometime. Then started giving errors for the ssh key. Then I tried with password. Then it started giving login errors with the password too and now it does not work on any of my own servers.

    Same login problem on own servers with both duplicated and new sites too. Latest publii and latest mac os here.

    Quite frustrating this small but critical thing (sftp upload) with such an otherwise excellent piece of software.

    Guess I will have to go back the simple ftp cdn hosting as I like Publii too much otherwise.

    JavaScript error occurred in the main process

    Uncaught Exception:
    Error: global-error-handler: Unexpected error: read ETIMEDOUT
    at fmtError (/Applications/Publii.app/Contents/Resources/app.asar/node_modules/ssh2-sftp-client/src/utils.js:53:18)
    at Client.<anonymous> (/Applications/Publii.app/Contents/Resources/app.asar/node_modules/ssh2-sftp-client/src/index.js:47:15)
    at Client.emit (events.js:315:20)
    at Client.EventEmitter.emit (domain.js:483:12)
    at Socket.<anonymous> (/Applications/Publii.app/Contents/Resources/app.asar/node_modules/ssh2/lib/client.js:307:10)
    at Socket.emit (events.js:315:20)
    at Socket.EventEmitter.emit (domain.js:483:12)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

    #6125
    Avatar photo[anonymous]

    Ok after thorough testing, deleting all the UUIDs, narrowed down the problem to SSH keys. Whichever provider stack I use on my self-hosted servers, the SSH key logins are consitently not working (unable to connect), even after generating new keys. SFTP passwords are working.

    After deleting the UUIDs for the previously duplicated sites, now the login works for each of them independently with the new Publii version.

    #6146
    Avatar photo[anonymous]

    Hi,

    Maybe you are using ssh-keys format which is incompatible with Publi SSH library? For me ssh keys are working fine – I have used it many times for the test purpose on my own VPS.

    #6859
    Avatar photo[anonymous]
    Tomasz Dziuda wrote:

    Hi,

    Maybe you are using ssh-keys format which is incompatible with Publi SSH library? For me ssh keys are working fine – I have used it many times for the test purpose on my own VPS.

    I am trying to understand the above sentence ^ but cannot make out the difference between the two references in bold, emphasis added. Is there something missing? Also looking into using SFTP (because netlify et al keep breaking for me) but have seen lots of concerns about SSH keys also failing for this or that reason.