diff options
author | Jason Brand <jbrand42@users.noreply.github.com> | 2022-02-15 23:15:23 +0000 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2022-03-11 18:33:50 -0500 |
commit | b9fc4f7c2cbfd319512b89d6af6421bb7cc1d2f0 (patch) | |
tree | 0ccc1b79371d9e01e80c61ce45d10c12d9970c4f | |
parent | f96319f35b4e2965b14d91e57418325639380548 (diff) |
%C support in config file
-rw-r--r-- | paramiko/config.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/paramiko/config.py b/paramiko/config.py index e6877d01..0e3a5eaa 100644 --- a/paramiko/config.py +++ b/paramiko/config.py @@ -27,6 +27,7 @@ import os import re import shlex import socket +import hashlib from functools import partial from .py3compat import StringIO @@ -435,7 +436,10 @@ class SSHConfig(object): # The actual tokens! replacements = { # TODO: %%??? - # TODO: %C? + "%C": hashlib.sha1((local_hostname + + target_hostname + + str(port) + + remoteuser).encode("utf-8")).hexdigest(), "%d": homedir, "%h": configured_hostname, # TODO: %i? |