Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

phpseclib error - connection failed #755

Open
joeyrush opened this issue Jul 17, 2017 · 8 comments
Open

phpseclib error - connection failed #755

joeyrush opened this issue Jul 17, 2017 · 8 comments

Comments

@joeyrush
Copy link

joeyrush commented Jul 17, 2017

I get the following error when running rocketeer deploy:

PHP Notice: No compatible key exchange algorithms found in phar:///usr/local/bin/rocketeer/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 1359

followed by a Rocketeer\Exceptions\ConnectionException

I had no issue deploying a few weeks back but now I get this error regardless of the environment & version of rocketeer that I use. Is it an issue with the server I'm deploying to or the place I'm deploying from? I'm able to SSH in from my terminal fine

@miholeus
Copy link
Contributor

What version of rocketeer do you use? Maybe you should try to update it. Also check if you have passphrase in your keys.

@srottem
Copy link

srottem commented Sep 30, 2017

I have the same problem and it occurs regardless of whether using username/password authentication or key/passphrase authentication. I'm running version 2.2.5.

@srottem
Copy link

srottem commented Sep 30, 2017

I'm suspicious that the issue is related to the age of some of the Rocketeer dependencies. Rocketeer depends on illuminate/remote ~4.2 which in turn depends on phpseclib/phpseclib 0.3.* , however the current version of phpseclib is 2.0.6. I'm wondering whether perhaps the SSH server I'm connecting to requires a key exchange algo that is not supported by phpseclib 0.3.* but might be supported by a newer version. Unfortunately, since it's illuminate/remote which specifies this dependency I'm not sure what can be done.

@srottem
Copy link

srottem commented Sep 30, 2017

It looks like the above is the case: the SSH server I'm connecting to (which I have no control over, unfortunately) doesn't support anything weaker than diffie-hellman-group-exchange-sha256 but phpseclib didn't implement support until after version 0.3.10 (it's in phpseclib/phpseclib#714).

@NeilrAyima
Copy link

+1

1 similar comment
@LimeUwe
Copy link

LimeUwe commented Feb 23, 2018

+1

@tantebootsy
Copy link

Hm, the project illuminate/remote seems to be dead. Is there a plan to move away from or continue developing it? Or can anybody provide a manual quickfix for this issue? I've searched for the phrase "phpseclib/phpseclib" within a composer.json on my system but couldn't find it. Pretty odd - where does illuminate/remote hide itself locally?

@LenzLueers
Copy link

LenzLueers commented Apr 12, 2018

I had the same issue and solved it by manually forking illuminate/remote and updating it with a recent version (2.*) of phpseclib. I also created a fork of rocketeer 2.2.5 to use my patched library. This works fine for me.

I published the forks on github, feel free to use them AT YOUR OWN RISK or create your own forks until rocketeer comes up with a permanent solution (v3 development branch seems to be working without the illuminate/remote library).

I added these dependencies to my projects composer project:

"require-dev": {
  "rocketeers/rocketeer": "dev-2.2.5-patch",
  "illuminate/remote": "dev-4.2-patch"
},
"repositories": [
  {
    "type": "vcs",
    "url": "https://github.com/lenzlueers/rocketeer.git"
  },
  {
    "type": "vcs",
    "url": "https://github.com/lenzlueers/remote.git"
  } 
],

ps. If someone cared to create real packages, that would be an even better quickfix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants