Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving SSH configuration defaults #4055

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions aiida/transports/plugins/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,15 @@ def _get_allow_agent_suggestion_string(cls, computer):
Return a suggestion for the specific field.
"""
config = parse_sshconfig(computer.hostname)
return convert_to_bool(str(config.get('allow_agent', 'no')))
return convert_to_bool(str(config.get('allow_agent', 'yes')))

@classmethod
def _get_look_for_keys_suggestion_string(cls, computer):
"""
Return a suggestion for the specific field.
"""
config = parse_sshconfig(computer.hostname)
return convert_to_bool(str(config.get('look_for_keys', 'no')))
return convert_to_bool(str(config.get('look_for_keys', 'yes')))

@classmethod
def _get_proxy_command_suggestion_string(cls, computer):
Expand Down Expand Up @@ -405,6 +405,8 @@ def open(self):
raise InvalidOperation('Cannot open the transport twice')
# Open a SSHClient
connection_arguments = self._connect_args
if 'key_filename' in connection_arguments and not connection_arguments['key_filename']:
connection_arguments.pop('key_filename')
proxystring = connection_arguments.pop('proxy_command', None)
if proxystring:
self._proxy = _DetachedProxyCommand(proxystring)
Expand Down