Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
EMACS TRAMP setup for "gcloud compute ssh"
;; TRAMP gcloud ssh
(add-to-list 'tramp-methods
(tramp-login-program "gssh")
(tramp-login-args (("%h")))
(tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-c"))
(tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null")
("-o" "UserKnownHostsFile=/dev/null")
("-o" "StrictHostKeyChecking=no")))
(tramp-default-port 22)))

This comment has been minimized.

Copy link
Owner Author

@scjody scjody commented Feb 5, 2018

Add this to your .emacs file to add a gssh method to TRAMP that connects to GCE instances on Google Cloud:

gssh is a script I wrote that should be in your path. If you don't find gssh useful, you can replace it with gcloud compute ssh.

Based on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment