Skip to content

Commit

Permalink
Tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Kundert authored and Ken Kundert committed Sep 14, 2018
1 parent 3c08e41 commit 3c277d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions core.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,11 @@ def process(self, entry, forwards):
filename = normpath(join(head(self.config_file), filename))
attribute = key, filename, desc
fields.append(attribute)
fields.append(('identitiesOnly', 'yes', None))
#fields.append(('identitiesOnly', 'yes', None))
# not sure this is a good idea
# causes problems if I copy a config file to a remote machine
# that does not have local copies of the keys and instead are
# using a forwarded agent.

# ForwardAgent
trusted = attributes.get('trusted')
Expand Down Expand Up @@ -254,13 +258,14 @@ def process(self, entry, forwards):

# ProxyCommand
attribute = attributes.get('proxyCommand')
network = NetworkEntry.find(self.network)
network_proxy = network.proxy if network else None
if attribute:
fields.append(attribute)
elif (
self.proxy and not (
self.proxy == entry.__name__.lower() or (
(self.proxy == NetworkEntry.find(self.network).proxy)
and (self.network in hostnames)
(self.proxy == network_proxy) and (self.network in hostnames)
)
)
):
Expand Down
2 changes: 1 addition & 1 deletion gensshconfig
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ networkName = identifyNetwork(PREFERRED_NETWORKS)
options = docopt(__doc__)
if options['--available']:
print(
'Foreign proxies (you can also use ssh hosts as proxies):\n '
'Explicit proxies (you can also use ssh hosts as proxies):\n '
+ '\n '.join(sorted(PROXIES.keys()))
)
print('Locations')
Expand Down

0 comments on commit 3c277d0

Please sign in to comment.