Formatting
This commit is contained in:
parent
0a276ac34b
commit
0981c25cd8
|
@ -157,26 +157,25 @@ class SSHConfig (object):
|
||||||
host = socket.gethostname().split('.')[0]
|
host = socket.gethostname().split('.')[0]
|
||||||
fqdn = socket.getfqdn()
|
fqdn = socket.getfqdn()
|
||||||
homedir = os.path.expanduser('~')
|
homedir = os.path.expanduser('~')
|
||||||
replacements = {'controlpath' :
|
replacements = {
|
||||||
[
|
'controlpath': [
|
||||||
('%h', config['hostname']),
|
('%h', config['hostname']),
|
||||||
('%l', fqdn),
|
('%l', fqdn),
|
||||||
('%L', host),
|
('%L', host),
|
||||||
('%n', hostname),
|
('%n', hostname),
|
||||||
('%p', port),
|
('%p', port),
|
||||||
('%r', remoteuser),
|
('%r', remoteuser),
|
||||||
('%u', user)
|
('%u', user)
|
||||||
],
|
],
|
||||||
'identityfile' :
|
'identityfile': [
|
||||||
[
|
('~', homedir),
|
||||||
('~', homedir),
|
('%d', homedir),
|
||||||
('%d', homedir),
|
('%h', config['hostname']),
|
||||||
('%h', config['hostname']),
|
('%l', fqdn),
|
||||||
('%l', fqdn),
|
('%u', user),
|
||||||
('%u', user),
|
('%r', remoteuser)
|
||||||
('%r', remoteuser)
|
]
|
||||||
]
|
}
|
||||||
}
|
|
||||||
for k in config:
|
for k in config:
|
||||||
if k in replacements:
|
if k in replacements:
|
||||||
for find, replace in replacements[k]:
|
for find, replace in replacements[k]:
|
||||||
|
|
Loading…
Reference in New Issue