Skip to content
Tramp helm interface for ssh and docker and ‎vagrant
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
image Delete image Dec 24, 2017
.gitignore add .gitignore Cask file Feb 6, 2017
LICENSE Add LICENSE Apr 10, 2017 Add document Jun 15, 2019
helm-tramp.el Fix typo Jun 16, 2019

helm-tramp melpa badge melpa stable badge License: GPL v3

Tramp helm interface for ssh server and docker and vagrant



M-x helm-tramp


Display server list from your ~/.ssh/config with helm interface.


Filter by helm.


You can connect your server with tramp.


Selecting the list with sudo will lead to the server as root. Selecting the list of '/sudo:root@localhost:/' will open file at localhost as root.


You can edit your server's nginx.conf on your emacs!


If you are using docker-tramp, docker is also supplemented. If you are using vagrant-tramp, vagrant is also supplemented.


You can edit docker container on your emacs!


When you finish editing nginx.conf you clean the tramp buffer with helm-tramp-quit command.


  • Emacs 24.3 or higher
  • helm 2.0 or higher


You can install helm-tramp.el from MELPA with package.el (M-x package-install helm-tramp). You can install docker-tramp.el from MELPA with package.el (M-x package-install docker-tramp). You can install vagrant-tramp.el from MELPA with package.el (M-x package-install vagrant-tramp).

I recommend you are going to install exec-path-from-shell.

Sample Configuration

(setq tramp-default-method "ssh")
(define-key global-map (kbd "C-c s") 'helm-tramp)

If you want to speed up tramp

(add-hook 'helm-tramp-pre-command-hook '(lambda () (global-aggressive-indent-mode 0)
				     (projectile-mode 0)
				     (editorconfig-mode 0)))
(add-hook 'helm-tramp-quit-hook '(lambda () (global-aggressive-indent-mode 1)
			      (projectile-mode 1)
			      (editorconfig-mode 1)))

Setting hook that turn off slow extensions when you execute helm-tramp. Setting hook that turn on extensions when you execute helm-tramp-quit command.

If you don't make a backup files and lockfiles at remote server, it will be saved faster.

(setq make-backup-files nil)
(setq create-lockfiles nil)

Misc setting

Besides ~/.ssh/config, you can add connections manually.

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

Example when adding more than two connections manually.

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

If the shell of the server is zsh it is recommended to connect with bash.

(eval-after-load 'tramp '(setenv "SHELL" "/bin/bash"))

If you want to specify the user name to connect with docker-tramp.

(setq helm-tramp-docker-user "username")

If you want to specify multiple user name list to connect with docker-tramp.

(setq helm-tramp-docker-user '("username1" "username2" "username3" "username4"))

If you want to change initial directory when connecting with /sudo:root@localhost:.

(setq helm-tramp-localhost-directory "/root")

Support for top-level sshconfig include

In addition to normal .ssh/config, it also supports the following format.


Include conf.d/work
Include conf.d/personal


Host instance
		HostName ************
		User ************
Host archtest
		HostName ************
		User ************

Host debiantest
		HostName ************
		User ************

Host centostest
		HostName ************
		User ************


Host myserver
		HostName ************
		User ************
Host myhost
		HostName ************
		User ************

Below is not support


Include conf.d/**

Support controlmaster paths

You can use it as follows.

(setq helm-tramp-control-master t)

Set ~/.ssh/config as below

Host *
  ControlMaster auto
  ControlPath ~/.ssh/master-%r@%h:%p
  ControlPersist 30m
  ForwardAgent yes
  ServerAliveInterval 60

Execute the ssh command as follows

ssh ubuntu@

~/.ssh/master-ubuntu@ will be generated automatically. Even if there is no connection setting in ~/.ssh/config, helm-tramp can complement like bellow.

You can’t perform that action at this time.