3 ms·
The point of ProxyCommand is that you don't have to leave your private key on the server..
by Tharkun 12y ago
The point of ProxyCommand is that you don't have to leave your private key on the server..
- mjs 12y agoIt can be password protected, though.
- lisper 12y agoYes, but then if I have to update 100 devhosts I have to type my password 100 times.
- pyre 12y agoThis could be automated. For example, both Ansible and Fabric allow you to enter your sudo password once (per run), and then it will enter it into the sudo prompt for you when executing remote commands. The same thing could be worked out for this (though I agree that it's a less flexible solution).
- lisper 12y agoHow is sudo supposed to help? I'm not trying to do anything that requires privileges on my machine, I'm trying to authenticate to github.
- pyre 12y agoIt's the same method. It uses something like expect to scrape the output of the commands, and determine that it needs to enter a password. That framework could be extended to do the same thing for git/ssh prompts on the remote machine. These tools don't currently do this, but I was just stating that it would be possible to enter the password once even when running this across multiple machines. Note that I'm not necessarily encouraging that as a solution. For example, I know that one of them (probably Fabric) defines the sudo prompt (via the -p flag or SUDO_PROMPT environment variable) to be able to pick out a sudo prompt in the text output of the command, so that it knows it needs to respond with the password.
- simcop2387 12y agoThe problem with that is that then to automate it you need the password in cleartext in memory. A core dump, ptrace, or anything like that and you've just given up all access.
- lisper 12y agoYes, obviously, but ProxyCommand won't work for this use case (AFAICT). I don't need to ssh from my home machine through my devhost to github, I need to execute a git comment on devhost that authenticates to github.