I use ssh-mode when I need to work on remote hosts. As I only establish ssh connections to hosts, that are stored in my ssh config file I want this list of hosts to be displayed in a helm-buffer.

1 Answer 1


I have found How to write helm extensions. Only thing I had to do was return the list of known hosts with pcmpl-ssh-hosts for the helm-source.

(setq ssh-helm-source
      `((name . "Known hosts")
        (candidates . ,(pcmpl-ssh-hosts))
        (action . (lambda (candidate)

(defun helm-ssh ()
   (mapconcat 'identity
              (helm :sources '(ssh-helm-source))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.