Skip to content
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

Allow the user to configure a pinentry #202

Closed
wants to merge 14 commits into from
Prev Previous commit
Next Next commit
Forgot to add pin/passentry args to ssh agent
  • Loading branch information
rendaw committed Feb 23, 2018
commit 1e61b62dd76a147065ff8bb293c2f51ff6ed9743
13 changes: 9 additions & 4 deletions libagent/ssh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ def create_agent_parser(device_type):
help='proto://[user@]host[:port][/path]')
p.add_argument('command', type=str, nargs='*', metavar='ARGUMENT',
help='command to run under the SSH agent')
p.add_argument('--pinentry', help='Configure a GPG PINENTRY program')
p.add_argument('--passentry',
help=('Configure a GPG PINENTRY program for passphrase '
'entry'))
return p


Expand Down Expand Up @@ -255,10 +259,11 @@ def main(device_type):
command = os.environ['SHELL']
sys.stdin.close()

config = {
'pinentry-program': args.pinentry,
'passentry-program': args.passentry,
}
config = {}
if args.pinentry:
config['pinentry-program'] = args.pinentry
if args.passentry:
config['passentry-program'] = args.passentry
conn = JustInTimeConnection(
conn_factory=lambda: client.Client(device_type(config=config)),
identities=identities, public_keys=public_keys)
Expand Down