Sign in

Can’t connect to sftp server

  • This topic has 12 replies, 4 voices, and was last updated 10 months, 3 weeks ago by .
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #3336
    fDoLPp5tckW52qNG

    I have verified that connecting to my server using sftp in the terminal works fine (`sftp sftp://username@example.com/var/www/html/blog`) but for some reason Publii won’t connect. When I test connection, I just get the message “Error! Application was unable to connect with your server.” I am using password authentication.

    Any help is appreciated, I’m completely stuck.

    #3337
    Tomasz Dziuda

    Hi,

    How did you configured your SFTP settings in Publii? Could you provide us an anonymised example?

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3344
    fDoLPp5tckW52qNG

    Thank you for the response, here is my configuration:

    Type: SFTP

    Domain: https:// example.com

    Port: 22

    Server: example.com

    Username: username

    Authentication method: Password

    Password: s3cr3t

    Remote path: /absolute/path/to/blog/

    #3352
    Tomasz Dziuda

    Looks correct… Could you try to sync (of course it won’t work) and then check logs in Tools -> Log viewer? Especially the deployment-errors.log and deployment-process.log files?

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3354
    fDoLPp5tckW52qNG

    All error logs are empty, deployment-process.log just says ERR (1): undefined

    #3355
    Tomasz Dziuda

    Could you provide me a temporary access to your SFTP in a private reply?

    Unfortunately all my servers which uses SFTP uses key-based authentication. I suppose that there can be some bug during preparing a connection in the SFTP library.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3356
    fDoLPp5tckW52qNG

    I cannot do that; the server belongs to the company I work for and I cannot give outside access.

    #3357
    Tomasz Dziuda

    So at this moment the only solution to deploy the website is to use manual upload – it will generate the output files which can be manually uploaded to the server.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3358
    fDoLPp5tckW52qNG

    That’s not going to work for us. Do you have plans to support sftp password authentication?

    Ideally we would use key authentication, but we require a system that can support multiple non-technical users–they do not have the knowledge or means to generate and manage keys. Publii appears to provide sftp password authentication based on the options available in the interface, but I believe you are saying that it hasn’t been tested and that, based on my report here, it is broken.

    Please let me know if I misunderstood; but if I do understand correctly then I would recommend removing the sftp password authentication feature, as it may save the next person from spending time trying to fix a server issue that doesn’t exist.

    #3364
    Tomasz Dziuda

    Hi again,

    I have checked SFTP auth with password and key after requesting my dev ops to change server configuration and allow password auth for SFTP.

    In both cases it works fine – app connects with server and then allow me to upload a website.

    I got only one issue – the sync stopped at 0 operations, but the problem was caused by a wrong remote path in the server configuration. After fixing a path it was ok.

    I suppose that your server is somehow incompatible with a SFTP library used in Publii or something is wrong with your server settings in Publii (but for me it looks correct).

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #3618
    Mickeyx

    Exactly the same issue here. Everything was working fine on June 6, when I did a successful sync with 36.0 release 5. Now the 36.1 and the release 5 don’t work. Not sure why this happened. I’m on Mac 10.15.6

    I use serverpilot to create an “App” on google cloud. It worked perfectly.

    Connecting with Transmit works. Connecting with Publii gives a connection error and temporarily blocks IP access to the server.

     

     

    #3664
    Tomasz Dziuda

    @Mickeyx – please check if the remote path is ok and if the connection test is successful. Publii tries to write a file in the pointed directory to make sure that it will be able to upload your website.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #4671
    kiskele

    I managed to solve the mistery. Unfortunately Publii doesn’t log anything about the connection failure. The problem was that when you enter password, Publii is authenticating with password (clear text) authentication and not keyboard-interactive. This is disabled by default on the ssh server because of security reasons and I don’t recommend to use it. Unfortunately keyboard-interactive is not supported so you should use authentication key instead.

     

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.