Kirk Ross
Kirk Ross

Reputation: 7153

SFTP - "EOF while reading packet" error in PhpStorm, works fine in FileZilla

I'm trying to get an SFTP connection working in PhpStorm. It works fine in FileZilla.

In the SSH config section of the STFP config, I enter host, username and auth type (password) and click Test Connection. It connects fine.

If I click OK and go dialog level back and click Test Connection on the main SFTP config, I get Connection to dev.the-server.net failed. EOF while reading packet error. Like wise when I close the SFTP config dialog, there is an EOF while reading packet error where a directory listing should be.

If I use the same credentials and connect by FTPS, I can get a remote directory listing and download files, but I get the end of file error trying to upload.

This all seems to be PhpStorm issue because I can upload and download fine with FileZilla. For workflow reasons, I really need PhpStorm to connect.

Any thoughts on where to start?

Images of the SFTP dialog:

Main SFTP config Main SFTP config

SSH section of SFTP config SSH section of SFTP config

Upvotes: 1

Views: 6992

Answers (4)

dragon fly
dragon fly

Reputation: 31

In my case I didn't install openssh in server. You can try this command.

sudo apt-get install openssh-server

sudo systemctl enable ssh

sudo systemctl start ssh

Upvotes: 0

Marcin Nabiałek
Marcin Nabiałek

Reputation: 111829

In my case I've changed SSH settings, restarted SSH service, restarted PHPStorm but it didn't help. But when I restarted the whole server and then tried again it started to working again.

Upvotes: 0

xxllxx666
xxllxx666

Reputation: 343

For me, it failed because sftp-server was configured with the wrong path in sshd_config, and this link saved me. so:

  1. Find the correct path of sftp-server (the whereis sftp-server command may be help), e.g. /usr/libexec/sftp-server.
  2. Set the correct path in sshd_config (most likely in /etc/ssh/sshd_config), e.g. Subsystem sftp /usr/libexec/sftp-server.
  3. Restart the sshd server (possibly /etc/init.d/sshd restart or /usr/sbin/sshd restart).
  4. Restart your IDE.

Upvotes: 1

Vitaly
Vitaly

Reputation: 91

Restarting PhpStorm helped to solve the problem.

Upvotes: 7

Related Questions