1

Problem Statement:

Connect to machineB (jupiter) via creta@recog.vision.uni-bonn.de. My problem is closest to link 1 below. However, none of the info in the links make it work. To make the matters worse, emacs -debug-init produces no helpful info...atleast for an Emacs newbie such as myself.

One such debug info:

Debugger entered--Lisp error: (void-variable tramp-default-proxies-alist) add-to-list(tramp-default-proxies-alist ("\\'jupiter\\'" nil "/ssh:creta@recog.vision.uni-bonn.de:")) eval-buffer(# nil "/home/creta/.emacs.d/init.el" nil t) ; Reading at buffer position 159 load-with-code-conversion("/home/creta/.emacs.d/init.el" "/home/creta/.emacs.d/init.el" t t) load("/home/creta/.emacs.d/init" t t) #[0 "\205\262

Could the hyphen in the domain (uni-bonn) make a difference? I even tried with uni-bonn and other combinations but it doesn't make a difference.

I can use tramp to ssh to creta@recog.... by C-x C-f /ssh:creta@recog.vision.uni-bonn.de: RET PASSWORD...but later I do not know how to ssh further into jupiter which is my workstation.

I have followed the advice here:

Link 1: How can I use Emacs Tramp to double hop ssh?

Link 2: Open file via SSH and Sudo with Emacs

Link 3: Emacs Tramp ssh double hop

Link 4: http://comments.gmane.org/gmane.emacs.tramp/7578

Link 5: http://www.gnu.org/software/emacs/manual/html_node/tramp/Multi_002dhops.html

It would be great if this annoying thing gets solved.

Thanks a lot. Have a great day!

EDIT 1: I dont mind if I need to ssh twice (first into domain and then workstation) though I dont know if its a good idea. ability to work with files as if local in emacs (with its diredplus and other goodies) is a nice feature.

EDIT 2: I am using Emacs 24.2 on a Ubuntu machine (Natty 11.04 --> should update soon) if that helps.

Community
  • 1
  • 1
snowmonkey
  • 287
  • 1
  • 5
  • 11
  • Note that with the shiny new Emacs 24.3, something analogous to (but more robust than) the old [multi:](http://stackoverflow.com/a/742667/324105) method has been implemented/restored. See http://www.gnu.org/software/tramp/#Ad_002dhoc-multi_002dhops (or if you're using 24.3, `C-h i g (tramp) Ad-hoc multi-hops RET`). – phils Mar 13 '13 at 20:34
  • Thanks for the heads up. I was planning to upgrade in April. This is helpful. – snowmonkey Mar 13 '13 at 23:53

1 Answers1

1

The error message you mentioned is caused by TRAMP not being loaded before you try to configure it. Try using something like this:

(require 'tramp)
(add-to-list 'tramp-default-proxies-alist ...)

Or (better in terms of loading time, but more subject to tricky quoting-related bugs):

(eval-after-load "tramp"
   '(add-to-list 'tramp-default-proxies-alist ...))
François Févotte
  • 19,520
  • 4
  • 51
  • 74
  • sweet! That did the trick. my uni login server is down for the past 2 hours but double hop ssh works elsewhere. With (setq tramp-default-method "ssh"), I need to only C-x C-f /user@host: RET password and I am through. Thanks a ton! Its strange, I spent almost 3 hours on this. Should learn to debug elisp code better. any tips? – snowmonkey Mar 13 '13 at 19:29
  • I don't have any fancy tip for you... I guess elisp is like any other language: the best way to learn is to practice. I, for example, really started learning elisp when I began customizing and extending for my own needs. – François Févotte Mar 13 '13 at 20:20