11

I've a remote server where I host my projects. And I'm using my PhpStorm locally, so every time I save, it synchronizes automatically with the remote server.

However, I failed to configure PhpStorm to run PHPUnit on the remote server.

Under Configure Remote PHP Interpreter I fill out the right information (Host, User name, and Password).

The error I'm having is "Algorithm negotiation fail" when I validate and "Test SFTP Connection: Connection to 'id address' failed. Connection failed" when I try to specify the path of PHP interpreter.

How do I fix that ?

smarber
  • 4,829
  • 7
  • 37
  • 78
  • Please refer to this ticket: https://youtrack.jetbrains.com/issue/WI-25360 – LazyOne Feb 19 '15 at 22:24
  • Also related (how it can be fixed from server side): http://stackoverflow.com/questions/26424621/algorithm-negotiation-fail-ssh-in-jenkins – LazyOne Feb 19 '15 at 22:29
  • Try Tools | Deployment | Configuration | Advanced settings -> Always use LIST command, might be helpful. – Kootli Feb 20 '15 at 10:43

4 Answers4

38

I had the same problem. I solved this problem by adding

KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

to

/etc/ssh/sshd_config 
and after that, I restart sshd
sudo systemctl restart sshd
rjaros
  • 495
  • 4
  • 5
8

Just upgraded Ubuntu to 16.04 and encountered this issue, the "Algorithm negotiation fail" in PHPStorm 8.0.3.

The problem is with the jsch-0.1.51.jar library. If you overwrite the jsch-0.1.51.jar file with the latest from https://sourceforge.net/projects/jsch/ (currently jsch-0.1.54.jar) and restart, it should be fine. No need to add insecure algorithms to your ssh daemon.

C. Harley
  • 201
  • 2
  • 4
2

As Guillaume Fache proposed, minimal configuration for PhpStorm is:

KexAlgorithms diffie-hellman-group1-sha1

but diffie-hellman-group1-sha1 use:

1) 1024 bits modulus - breakable, marked as insecure

2) SHA-1 - breakable, confirmed collision attack possibility


conclusion:

use public/private key pair - more secure and no needs to save or type password

enter image description here

wasikuss
  • 969
  • 8
  • 13
1

edit this file :

sudo /etc/ssh/sshd_config 

add this line :

KexAlgorithms diffie-hellman-group1-sha1

and restart :

sudo systemctl restart sshd

It works for me!

Biker974
  • 11
  • 1