3

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?

pawel_winzig
  • 902
  • 9
  • 28
  • 2
    Have you had a look at the documentation? http://www.gnu.org/software/emacs/manual/html_node/tramp/Multi_002dhops.html – Thomas Jun 26 '12 at 10:23

1 Answers1

3

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.

Community
  • 1
  • 1
pawel_winzig
  • 902
  • 9
  • 28