Skip to content

Instantly share code, notes, and snippets.

@cimmwolf
Created June 10, 2015 09:03
Show Gist options
  • Save cimmwolf/7d67443c30e10f46b6ac to your computer and use it in GitHub Desktop.
Save cimmwolf/7d67443c30e10f46b6ac to your computer and use it in GitHub Desktop.
Fix PHPStorm ssh client error "Algorithm negotiation fail"
KEXALGORITHM='KexAlgorithms [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1'
ISSET_KEXALGORITHM=`grep -c "$KEXALGORITHM" /etc/ssh/sshd_config`
if [ "$ISSET_KEXALGORITHM" -eq 0 ]; then
echo "$KEXALGORITHM" >> /etc/ssh/sshd_config
sudo service ssh restart
fi
@remory08
Copy link

remory08 commented Aug 8, 2016

Thanks for the patch. I'm still a newb, where do I add this code to fix PHPStorm?

@hopewise
Copy link

hopewise commented Nov 1, 2016

Where is that PHPStormSSH.sh file?

@chaddoncooper
Copy link

You're adding this to the server you're trying to connect to

@jschirrmacher
Copy link

Yes, that helps connecting, but has the side effect that your server is vulnerable due to an insecure protocol... it was disabled in newer distributions of Linux by default for a reason.
I'd propose to instead update your (client side) JDK to 1.8 and even older PhpStorms work again with newer Linux servers.

@botris
Copy link

botris commented Feb 24, 2018

For restarting the ssh service on OSX
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment