-
Notifications
You must be signed in to change notification settings - Fork 48
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
Remote SSH execution fails if private key has passphrase #126
Comments
@wintermute000 thanks for reporting the issue, we're working on fixing. will update later. |
fixed in PR #127 , released in v0.3.0. pls have a try and let us know if any other problems. |
how do I used it? I tried to add a passphrase keypair but that didn't do it. |
if you've updated your remote host entry in $HOME/.ssh/servers.json with passphrase as below:
then just trigger run playbook remotely via ssh. |
No matter how I edit C:\user<user>.ssh\servers.json, it always reverts back. am I doing anything wrong? This is in Win10. |
are you following "Add New Host" process everytime when "run playbook rermotely via ssh", in the wizard, it will pop up a list with remote hosts in your servers.json, pick it from existing list. |
If I follow add new host, I don't get any option to add a SSH key or passphrase. If I edit c:\users\XYZ.ssh\servers.json, it seems to change every time. |
Great, that's clear now, works. |
use configuration item |
I tried this e.g. “-i ./hosts”, does nothing. I’ll try reading more
From: Yunge Zhu [mailto:[email protected]]
Sent: Friday, 27 July 2018 12:06 PM
To: VSChina/vscode-ansible <[email protected]>
Cc: wintermute000 <[email protected]>; Mention <[email protected]>
Subject: Re: [VSChina/vscode-ansible] Remote SSH execution fails if private key has passphrase (#126)
use configuration item ansible.customOptions. pls see more detail in readme.md.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#126 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ASmLMJKilKca37njBlWZx85w7-yZeTMUks5uKnWjgaJpZM4UhM3b>.
|
Environment
Win10
Extension 0.2.6
Summary
Trying to use remote SSH execution with a server that utilizes SSH key with passphrase.
There is nowhere in instructions or config sample JSON to provide passphrase so the SSH fails.
If I try to add a passphrase field in the JSON, it treats it as invalid
Reproduce steps
Use SSH server that has SSH key + passphrase
Copying c:\Users\xxx\Documents\Untitled-1.yml to xxx.xxx.xxx.xxx..
Failed to copy c:\Users\xxx\Documents\Untitled-1.yml to xxx.xxx.xxx.xxx: scp error: Error: Encrypted private key detected, but no passphrase given
Expected Results
Remote execution of playbook/copy of workspace via SSH
either prompt for passphrase or allow to store in servers.json
Actual Results
Configuration of .ssh/servers.json should have field for passphrase and it should work
[
{
"host": "xx.xxx.xxx.xxx",
"port": 22,
"user": "xxx",
"password": "xxx",
"key": "C:/Users/xxx/xxx/ssh/id_rsa"
}
]
The text was updated successfully, but these errors were encountered: