-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
PR: Implement support for OpenSSH client config files (Remote Client) #24343
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
base: master
Are you sure you want to change the base?
Conversation
Ok, in that case I think we must provide those fields so users can optionally set them. I thought they were provided by the config file only, but it is (of course) a security risk to set a password/passphrase in a plain text file. So, please do that as part of this PR. |
d49c77c to
f8957be
Compare
ccordoba12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dalthviz, this still needs more work to do more validatations for the info introduced in this new page.
Co-authored-by: Carlos Cordoba <[email protected]>
@jitseniesen I agree with having a password prompt where it is only persisted in memory (or only ephemerally), but FWIW, Spyder isn't actually storing your password (which would indeed be a horrible security practice), your OS is storing it in its central secure vault, which even if you use a separate password manager (as I've done for the past ~two decades, Bitwarden currently and LastPass long ago) is still going to get used to some extent for secure storage by properly-written applications. For example, unless you type your GitHub pw or SSH/keyfile passphrase every time you interact with GitHub or any remote Git repo (or on every commit, if you sign them on demand with |
…eated server connection configs. Some validation logic cleanup
ccordoba12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dalthviz for your continued work on this!
Co-authored-by: Carlos Cordoba <[email protected]>
…prove config widget access logic for validations
ccordoba12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last suggestions for you @dalthviz.
|
@dalthviz, I'm also getting this traceback after trying to open the remote connections dialog for the second time (the first time it was shown as expected, i.e. I didn't get the error I mentioned before): Traceback (most recent call last):
File "/home/carlos/Projects/spyder/spyder/spyder/plugins/remoteclient/widgets/container.py", line 167, in _show_connection_dialog
self._connection_dialog = dlg = ConnectionDialog(self)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/carlos/Projects/spyder/spyder/spyder/plugins/remoteclient/widgets/connectiondialog.py", line 67, in __init__
self._add_saved_connection_pages()
File "/home/carlos/Projects/spyder/spyder/spyder/plugins/remoteclient/widgets/connectiondialog.py", line 386, in _add_saved_connection_pages
self._add_connection_page(host_id=id_, new=False)
File "/home/carlos/Projects/spyder/spyder/spyder/plugins/remoteclient/widgets/connectiondialog.py", line 369, in _add_connection_page
page.add_logs(self._container.client_logs.get(host_id, []))
File "/home/carlos/Projects/spyder/spyder/spyder/plugins/remoteclient/widgets/connectionpages.py", line 1414, in add_logs
self.status_widget.add_logs(logs)
^^^^^^^^^^^^^^^^^^
AttributeError: 'ConnectionPage' object has no attribute 'status_widget' |
Co-authored-by: Carlos Cordoba <[email protected]>
| FIXED_SIZE = True | ||
| MIN_WIDTH = 895 if MAC else (810 if WIN else 860) | ||
| MIN_HEIGHT = 740 if MAC else (655 if WIN else 690) | ||
| MIN_HEIGHT = 855 if MAC else (780 if WIN else 795) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dalthviz, I selected these height values to have the necessary space in the dialog to show the validation warnings.
However, you're reducing them even when you're also adding a new field for the config file. Did you check that things still look good with these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I got confused. My comment should have been if you checked that the new values look good with the new field you added and the validation warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest commit adds some changes for related values on Windows. I'm missing to check on macOS and Linux
Co-authored-by: Carlos Cordoba <[email protected]>
|
/show binder |
d0205f3 to
c899fea
Compare
Description of Changes
A preview:
Some resources that could be useful to add for more info on what config is supported by
AsyncSSH: https://asyncssh.readthedocs.io/en/latest/api.html#supportedclientconfigoptionsSome other notes:
username,port,password,client_keysandpasspharse) be available but optional? Without those being provided I guess the only way to connect via a config file would be to set all of them in the config file. Also, something to note is thatpasswordandpassphrasearen't part of the OpenSSH client config specification, so the config will need to have theIdentityFilekeyword set to a key without passphrase/or to a key with a passphrase but that is being handle viassh-agentand in a session where thepassphrasehas already been provided if I understand correctly (at least that seems needed from my local testingwhen trying to establish a connection via a config file 🤔).Issue(s) Resolved
Fixes #22464
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: dalthviz