Reputation: 7153
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:
Upvotes: 1
Views: 6992
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
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
Reputation: 343
For me, it failed because sftp-server
was configured with the wrong path in sshd_config
, and this link saved me. so:
sftp-server
(the whereis sftp-server
command may be help), e.g. /usr/libexec/sftp-server
.sshd_config
(most likely in /etc/ssh/sshd_config
), e.g. Subsystem sftp /usr/libexec/sftp-server
.sshd
server (possibly /etc/init.d/sshd restart
or /usr/sbin/sshd restart
).Upvotes: 1