Question

how to accomplish a multihop ssh session in emacs as in the following example,

ssh -t username@login-server -t ssh username@my-institute-computer 

using the tramp mode? M-x f RET and then "/ssh: -t ..." seems not to be correct

Thank you for your help!


Edit: It seems that adding

Host my-institute-computer
ProxyCommand ssh login-server nc my-institute-computer 22

to ~/.ssh/config makes the input in emacs possible where I get asked twice for a password. However, now I receive "Permission denied (publickey,keyboard-interactive)". Do you have an idea why?

Was it helpful?

Solution

The best solution for me was using emacs with

(add-to-list 'load-path "~/.emacs/tramp/lisp/")
  (require 'tramp)
(add-to-list 'tramp-default-proxies-alist
         '("destiny.server" nil "/ssh:username@login.server:"))

added in the .emacs file (as suggested in How can I use Emacs Tramp to double hop ssh?).

First, I had the problem that my tramp-version was not supporting tramp-default-proxies-alist. After updating it (http://ftp.gnu.org/gnu/tramp/) everything worked fine. Now it's enough to M-x f RET and then "/ssh:username@destiny.server:" to enter the remote server behind the login-server.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top