Closed rocketeerbkw closed 6 months ago
This one is testing well.
Unfortunately there's something triggering \ufffd
to appear on the status output that can't be filtered out.
Otherwise looks good, and I'll merge it - all other testing is still passing.
https://github.com/golang/go/issues/48749
We should look to improve testing on this one in the future though.
By the way, thank you for the work on this.
An issue for this change is required
Description
This PR changes the functionality of the add key process to use an interactive shell so that the password prompt can be passed to the host/user to be entered manually.
I did some initial testing and research to try and use the existing
--passphrase
cli flag but couldn't find a secure way to either inject the passphrase or the decrypted key into the ssh-agent container. This PR removes the passphrase flag altogether in favor of forwarding the ssh-agent password prompt to the user.I tested this and it works on Linux (intel, Ubuntu 23.04), MacOS (intel, Ventura), and Windows (intel, 11, WSL2+Docker Desktop). On windows using powershell/cmd.exe, the password is not hidden as you type, but at least it will not be saved in shell history. I also found an error with ssh key permissions on windows and included a fix for that.
Example usage where I enter an incorrect password the first time, but the correct password the second time:
Resolves
This PR resolves issue #333
Non-standard tests for this change
If any non-standard testing is expected, please describe it here.