Question

I know that it's possible to edit code on the remote server with emacs and scp. I use tramp for this. For example it is described here: http://jeremy.zawodny.com/blog/archives/000983.html

But is it possible to edit code via remote gateway with emacs? That means that to access the code one has to login to gateway server first and then login to other server.

Was it helpful?

Solution

I think the keyword you are missing is "Multi Hops". It is possible to do this with TRAMP; you'll find all the details in the relevant manual sections :

For example:

;; ensure `tramp-default-proxies-alist' is defined before we append to it
(require 'tramp)

;; Add the proxy rule
(add-to-list 'tramp-default-proxies-alist
             '("server2\\.blabla\\.de" nil "/ssh:server1.blabla.de:"))
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top