Skip to content

Commit

Permalink
Merge branch 'client_version_override'
Browse files Browse the repository at this point in the history
  • Loading branch information
Snawoot committed Aug 21, 2019
2 parents 2f02c6d + 6eee3e0 commit 87d5a3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ usage: rsp [-h] [-v {debug,info,warn,error,fatal}] [-l FILE]
[--disable-uvloop] [-a BIND_ADDRESS] [-p BIND_PORT] [-n POOL_SIZE]
[-B BACKOFF] [-w TIMEOUT] [-r CONNECT_RATE] [-L LOGIN]
[-I KEY_FILE] [-P PASSWORD] [-H FILE]
[--client-version CLIENT_VERSION]
dst_address [dst_port]
Rapid SSH Proxy
Expand Down Expand Up @@ -103,6 +104,8 @@ SSH options:
-H FILE, --hosts-file FILE
overrides known_hosts file location (default:
/home/user/.rsp/known_hosts)
--client-version CLIENT_VERSION
override client version string (default: None)
```

#### Usage examples
Expand Down
4 changes: 4 additions & 0 deletions rsp/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def parse_args():
'known_hosts'),
help="overrides known_hosts file location",
metavar="FILE")
ssh_group.add_argument("--client-version",
help="override client version string")

return parser.parse_args()

Expand All @@ -97,6 +99,8 @@ def ssh_options_from_args(args, known_hosts):
kw['known_hosts'] = known_hosts
if args.login is not None:
kw['username'] = args.login
if args.client_version is not None:
kw['client_version'] = args.client_version
if args.identity is not None:
kw['client_keys'] = list(args.identity)
if args.password is not None:
Expand Down

0 comments on commit 87d5a3e

Please sign in to comment.