2

I have followed (and partially adapted) the recommendations in Open file via SSH and Sudo with Emacs

My custom.el contains something like the following:

(custom-set-variables
  '(tramp-default-proxies-alist (quote (("my-sudo-alias" nil "/ssh:user@host")))))

However when I try to visit a remote file say sudo:my-sudo-alias:/etc/whatever I get the following error: Method `scpc' is not supported for multi-hops.

How do I fix this?

Community
  • 1
  • 1
manu
  • 3,544
  • 5
  • 28
  • 50

1 Answers1

1

Perhaps something else in your proxy list is interfering?

What does C-h v tramp-default-proxies-alist look like?

You might also have scpc set as your tramp-default-method. I don't think that should be an issue in this case, but I'm not certain of that.

Did you try the ad-hoc approach that I detailed in the Q&A you linked to?

If that doesn't work, try emptying the proxy list, and then trying it again.

Note also that the scpc & rsyncc tramp methods are deprecated in the latest Tramp (ControlMaster is now used automatically if it is available).

Community
  • 1
  • 1
phils
  • 71,335
  • 11
  • 153
  • 198
  • Hum... I need to load tramp before I can do C-h v tramp-default-proxies-alist. Maybe this is Ok. But the value is simply: `Its value is (("sqli" nil "/ssh:USER-HERE@HOST"))`... – manu Oct 11 '13 at 14:00
  • C-h i g Only completes "(tramp)". There is a multi-hop chapter (4.9) but I don't see any "Ad-hop multi-hop" chapter... – manu Oct 11 '13 at 14:05
  • Yeah, you can't auto-complete across manuals, which is a shame. You *can* within the manual though. e.g.: `C-h i g (tramp) RET m Ad-hocTAB`. I did think this was added in Emacs 24.1, but the NEWS file suggests it was 24.3, so you probably just need to upgrade. – phils Oct 11 '13 at 22:43
  • Well, you should be able to get a working proxy without upgrading, but upgrading is probably a good idea in general. Certainly if you're running an earlier version of Emacs 24. If you're still on Emacs 23 then it might be more effort, but it's something you'll most likely want to do at some point. – phils Oct 11 '13 at 22:56
  • 1
    I've just tried the C-x C-f /ssh:you@remotehost|sudo:them@remotehost:/path/to/file RET as described in [the link provided](http://stackoverflow.com/questions/2177687/open-file-via-ssh-and-sudo-with-emacs/16408592#16408592). So I will accept this answer and thank @phils. – manu Nov 28 '13 at 21:12