mirror of
https://github.com/romanz/amodem.git
synced 2026-05-09 21:13:04 +08:00
ssh: allow configuration from a file
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
"""SSH-agent implementation using hardware authentication devices."""
|
"""SSH-agent implementation using hardware authentication devices."""
|
||||||
import argparse
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import functools
|
import functools
|
||||||
import io
|
import io
|
||||||
@@ -11,6 +10,7 @@ import sys
|
|||||||
import tempfile
|
import tempfile
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
|
import configargparse
|
||||||
|
|
||||||
from .. import device, formats, server, util
|
from .. import device, formats, server, util
|
||||||
from . import client, protocol
|
from . import client, protocol
|
||||||
@@ -57,7 +57,7 @@ def _to_unicode(s):
|
|||||||
|
|
||||||
def create_agent_parser():
|
def create_agent_parser():
|
||||||
"""Create an ArgumentParser for this tool."""
|
"""Create an ArgumentParser for this tool."""
|
||||||
p = argparse.ArgumentParser()
|
p = configargparse.ArgParser(default_config_files=['~/.ssh/agent.config'])
|
||||||
p.add_argument('-v', '--verbose', default=0, action='count')
|
p.add_argument('-v', '--verbose', default=0, action='count')
|
||||||
|
|
||||||
curve_names = [name for name in formats.SUPPORTED_CURVES]
|
curve_names = [name for name in formats.SUPPORTED_CURVES]
|
||||||
|
|||||||
Reference in New Issue
Block a user