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

Improve the parsing of the SSH proxy_command #3311

Open
giovannipizzi opened this issue Sep 11, 2019 · 0 comments
Open

Improve the parsing of the SSH proxy_command #3311

giovannipizzi opened this issue Sep 11, 2019 · 0 comments

Comments

@giovannipizzi
Copy link
Member

When reading the proxy_command from YAML file in verdi computer configure ssh, and I think also when reading it from command line parameters, the string is not cleaned up from %h, %p and/or from >/dev/null bits.

This logic is present only in the function _get_proxy_command_suggestion_string(cl�s, computer) , that is used to provide the default value by reading from the ~/.ssh/config file; it relies on paramiko itself changing %h and %p when reading the config file, and has some logic for removing the redirections.

I think the logic should be extracted to a function, possibly we need to implement the logic for %h and %p if needed, and then call this logic not only to provide a default, but also to validate and change the input of the user.

Otherwise, a second option: we don't change what the user passes (might be a better idea), but we need to document what we expect as a value (i.e. replace %h with hostname, don't put redirection, ...) and validate the user input, complaining with an informative message if %h or %p are found, or a redirection character > is found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants