Can’t connect to sftp server
- This topic has 12 replies, 4 voices, and was last updated 8 months ago by .
- August 4, 2020 at 1:46 am #3336fDoLPp5tckW52qNG
I have verified that connecting to my server using sftp in the terminal works fine (`sftp sftp://email@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.August 4, 2020 at 7:19 am #3337Tomasz Dziuda
How did you configured your SFTP settings in Publii? Could you provide us an anonymised example?August 4, 2020 at 4:42 pm #3344fDoLPp5tckW52qNG
Thank you for the response, here is my configuration:
Domain: https:// example.com
Authentication method: Password
Remote path: /absolute/path/to/blog/August 4, 2020 at 6:11 pm #3352Tomasz 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?August 4, 2020 at 7:25 pm #3354fDoLPp5tckW52qNG
All error logs are empty, deployment-process.log just says ERR (1): undefinedAugust 4, 2020 at 7:41 pm #3355Tomasz 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.August 4, 2020 at 7:47 pm #3356fDoLPp5tckW52qNG
I cannot do that; the server belongs to the company I work for and I cannot give outside access.August 4, 2020 at 10:52 pm #3357Tomasz 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.August 4, 2020 at 11:28 pm #3358fDoLPp5tckW52qNG
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.August 5, 2020 at 9:29 am #3364Tomasz Dziuda
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).August 24, 2020 at 11:36 am #3618Mickeyx
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.August 30, 2020 at 3:07 pm #3664Tomasz 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.December 2, 2020 at 5:16 pm #4671kiskele
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.
- You must be logged in to reply to this topic.