connectionmanager2 icon indicating copy to clipboard operation
connectionmanager2 copied to clipboard

Could not parse valid .ssh/config

Open gerdriesselmann opened this issue 9 years ago • 2 comments

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 avatar Apr 08 '15 14:04 gerdriesselmann

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 avatar Apr 08 '15 14:04 gerdriesselmann

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

ikus060 avatar Aug 31 '16 12:08 ikus060