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

Could not parse valid .ssh/config #51

Open
gerdriesselmann opened this issue Apr 8, 2015 · 2 comments
Open

Could not parse valid .ssh/config #51

gerdriesselmann opened this issue Apr 8, 2015 · 2 comments

Comments

@gerdriesselmann
Copy link

My .ssh/config looks like this:

Host example.de
        HostName example.de
        User them

Host example.com example.org
        User me

However, ConnectionManager is not able to parse it. I did a look into the code, and there are a couple of problems here:

  • The line Host example.com example.org is not translated into two entries, but only one
  • Since it misses a HostName entry, the previous entry is reused.

All in all this results into

Expected behavior would be:

  • Split Host by \s+ and create entry for each of resulting items
  • If HostName is not set, use value of Host (that is the current item) instead

Given the above example, the following result is expected:

@gerdriesselmann
Copy link
Author

Given the SSH settings are already configured through SSH config, it would be enough to just read the Host line, split it by space and create an entry for each item with title and host set to the item itself. User, HostName, and Port may be ignored.

At least that's what the SSH Search Provider Extension (https://github.com/brot/gnome-shell-extension-sshsearch) does.

gerdriesselmann added a commit to gerdriesselmann/connectionmanager2 that referenced this issue Apr 8, 2015
Fixed .ssh/config parsing but replaces it by a simpler algorithm, ignoring HostName, User, Port (and IdentityFile, which is already ignored)
gerdriesselmann added a commit to gerdriesselmann/connectionmanager2 that referenced this issue Apr 8, 2015
Fixed .ssh/config parsing but replaces it by a simpler algorithm, ignoring HostName, User, Port (and IdentityFile, which is already ignored)
@ikus060
Copy link

ikus060 commented Aug 31, 2016

Bump, Any update of this issue. I'm trying to use this feature, but I canot get ConnectionManager to load my config.

Borromini pushed a commit to Borromini/connectionmanager2 that referenced this issue Sep 13, 2016
Fixed .ssh/config parsing but replaces it by a simpler algorithm, ignoring HostName, User, Port (and IdentityFile, which is already ignored)
Silarn added a commit to Silarn/connectionmanager2 that referenced this issue Mar 17, 2017
pieska added a commit to pieska/connectionmanager2 that referenced this issue May 8, 2021
xkahn pushed a commit to xkahn/connectionmanager2 that referenced this issue Nov 26, 2023
Fixed .ssh/config parsing but replaces it by a simpler algorithm, ignoring HostName, User, Port (and IdentityFile, which is already ignored)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants