masasam/emacs-counsel-tramp

Use known hosts instead of config

Closed this issue · 1 comments

My ssh config has lots of wildcard patterns for hosts under domain names. Basically, my ssh config is useless for getting host names. Specific host names would probably be easier to get out of known hosts.

Hi @wraithm ,
Thanks for comment.

There are two reasons counsel-tramp does not use known host instead of config.
It is not good to display github.com on known host with counsel-tramp when github is used for ssh authentication.
Also, when using the known host for the first time, we can not connect server with counsel-tramp.

You can define host name at 5e3345f if you can not change .ssh/config.

You can add connections manually.

(setq counsel-tramp-custom-connections '(/ssh:domain|sudo:user@localhost:/))

Example when adding more than two connections manually.

 (setq counsel-tramp-custom-connections '(/ssh:domain|sudo:user@localhost:/ /ssh:domain2|sudo:user@localhost:/))