New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSH Error: "Unable to load RSA key." #55
Comments
Are you specifying a key path in your configuration? It might be a good idea to add something like this t your config to see the exact location of where Pomander is looking for your key: <?php
after('app', function($app) {
info('key_path', $app->env->key_path);
}); |
@h4cc hey did you ever get this sorted out? |
@tamagokun I did some more tests and found this out: A newly generated key that WORKS looks like this:
But my personal key has two more lines at the top, like this and des NOT work.
Hope this helps. |
Interesting. This might be a limitation of PHPseclib, whinc is used to handle all the SSH stuff.— On Wed, Jun 25, 2014 at 5:10 PM, Julius Beckmann notifications@github.com
|
Those 2 additional lines are there because there is a pass phrase associated with your private key. Phpseclib can definitely parse a key with those lines in it, so my first guess would be that your pass phrase is incorrect. |
If you could set up an example using phpseclib like this: <?php
require 'vendor/autoload.php';
$rsa = new Crypt_RSA();
$rsa->setPassword('my passphrase');
$rsa->loadKey(file_get_contents('/path/to/keys/id_rsa'));
print_r($rsa); and show me what gets printed, that might help narrow things down. If the key is getting loaded correctly and still isn't working, but you can connect over ssh from the command line, then this is most definitely a bug with phpseclib that should be reported. |
@tamagokun I tried using a password for my private key and your guess seem to be right. Sorry for the inconvenience. |
I tried to deploy with pomander, but it fails with my working SSH Key. A plain ssh login works.
Error message:
Tried against ǜersion
"pomander/pomander": "dev-master"
.The head of my private key:
The text was updated successfully, but these errors were encountered: