SFTP gives error: EOF while reading Packet

I am trying to set up an SFTP deployment in PhpStorm 2021.2.2 (I originally tried in the latest EAP but reverted to release to test it wasn't an issue with that).

When I set up the deployment, I select SFTP and click on SSH configuration - this part works fine and the test connect without issue (whether I use Password, Key Pair, or OpenSSH Config and Authentication Agent) and get the message: "Connection to <mydomain>:22 Successfully Connected!"

So far, so good.

However, once I return to the deployment setup screen and test it there, there message is: "Test SFTP Connection. Connection to <mydomain> failed. EOF while reading packet"

It doesn't matter what changes I make on the deployment screen, the problem persists.

Anybody got any idea what I am doing wrong?

 
0
6 comments

Unfortunately, it is hard to say anything for sure without checking logs first -- each scenario could be very different.

It would be great if you could enable the extended logging, reproduce the error and then collect log files and submit a support request.

To increase the deployment actions logging level, please add the following lines to the "Help > Diagnostic Tools > Debug Log Settings" section:
#com.intellij.ssh
#com.jetbrains.plugins.webDeployment

Afterwards, logs can be collected with the "Help > Collect Logs" menu option.

0

This can now be ignored or deleted as the problem was on the server side, allowing successful authentication but not actually allowing a proper connection.

However, it is misleading that the test under the SSH Configuration claims to connect successfully (when what it means is that it authenticated successfully). Yet, what appears to be the same test on the deployment screen, fails with an obscure error message.

0
Avatar
Adrian Eggenberger

Scott Goddard: I'm currently see the exact same behavior as you did. Can you give me a hint what was the failure in the server configuration?

0

@...: The issue was on a Plesk server and the account I was using for this connection was not set up to allow SSH logins. Changing that rectified the issue.

0

Scott Goddard: I had the same behavior with the deployment connection. I removed the preview setting, added it again, and reset phpStorm, and it worked. 

0

Make sure your target device runs a full sftp implementation. Some embedded devices only support older legacy protocol (usually the client side scp requires -O parameter). 

If you are running openwrt or some derivative like me, ensure you have the full "openssh-sftp-server" package installed. 

I hope this helps, the debugging info above helped me a little, but it still wasn't obvious but the package fixed it for me :)

Good luck!

Update: Ah, I saw you sorted it out due to multiple logins, maybe this will help for other people (awesome you got it working).

0

Please sign in to leave a comment.