-
Notifications
You must be signed in to change notification settings - Fork 15
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
Bug with ssh key encrypted with a passphrase #57
Comments
Indeed Cloudy Pad does not handle SSH key passphrase for now. However you should be able to use ssh-agent ;) Fix incoming anyway ! |
Yeah I think the library sshpk doesn't seem to care about ssh-agent, which I do have my key set and loaded into with the passphrase. |
ok, I am missing something here. my ssh key is loaded with ssh-agent and is offered when creating an instance. but the error pops up anyway. I created another passwordless keypair but this one isn't offered (does it need to be loaded with ssh-agent?) |
SSH key handling has to be improved, in its current state it has limitations: only keys under @perler where is your new keypair located in machine? Alternatively you can use |
ok, this is strange, the key is in |
... and only files starting with The then-me knew it was not ideal:
|
haha, ok, yes, that's the problem, the key is simply named "cloudypad". Which doesn't follow conventions, so it's more or less my fault. I changed the name, now it works (this part at least, don't have the time now to test the whole thing..) |
Great, let me know |
The SSH key i want to use is encrypted with a passkey.
It looks like the library you are using has the option to pass a passkey in but throws an exception if one is not provided at code time.
KeyEncryptedError: The OpenSSH format key (unnamed) is encrypted (password-protected), and no passphrase was provided in
optionsat Object.readSSHPrivate (/cloudypad/node_modules/sshpk/lib/formats/ssh-private.js:78:11) at Object.read (/cloudypad/node_modules/sshpk/lib/formats/pem.js:209:19) at Object.read (/cloudypad/node_modules/sshpk/lib/formats/ssh-private.js:26:14) at Key.parse (/cloudypad/node_modules/sshpk/lib/key.js:252:27) at parseSshPrivateKeyToPublic (/cloudypad/dist/src/tools/ssh.js:169:42) at parseSshPrivateKeyFileToPublic (/cloudypad/dist/src/tools/ssh.js:166:12) at AwsProvisioner.provision (/cloudypad/dist/src/providers/aws/provisioner.js:68:85) at processTicksAndRejections (node:internal/process/task_queues:95:5) at AwsInstanceInitializer.runProvisioning (/cloudypad/dist/src/providers/aws/initializer.js:27:9) at AwsInstanceInitializer.initializeInstance (/cloudypad/dist/src/core/initializer.js:106:9) { format: 'OpenSSH', keyName: '(unnamed)' }
The text was updated successfully, but these errors were encountered: