From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: remote file editing over ssh with emacs 22.3.1 on Windows Date: Sun, 10 May 2009 10:50:07 +0200 Organization: aich tea tea pea dicky riley dot net Message-ID: References: <4A02A04F.6010307@simplistix.co.uk> <83hbzwdazt.fsf@gnu.org> <0F841C30-5A42-4F96-95CE-49FA51BDBDB6@digg.com> <4A04A18F.2020404@simplistix.co.uk> <833abedact.fsf@gnu.org> <4A0543A3.9000007@simplistix.co.uk> <616ABE37-83DE-43D4-A4CA-FE18AD9A3063@Web.DE> <87prehic0d.wl%anselm.helbig+news2009@googlemail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1241948734 6198 80.91.229.12 (10 May 2009 09:45:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 May 2009 09:45:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 10 11:45:26 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M35b2-00046s-CZ for geh-help-gnu-emacs@m.gmane.org; Sun, 10 May 2009 11:45:25 +0200 Original-Received: from localhost ([127.0.0.1]:47663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M35b1-0007tl-Qo for geh-help-gnu-emacs@m.gmane.org; Sun, 10 May 2009 05:45:23 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newsfeed.esat.net!colt.net!feeder.news-service.com!feeder.motzarella.org!news.motzarella.org!motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 49 Original-X-Trace: news.eternal-september.org U2FsdGVkX19L/3cXZg5IBQ/57uGT5qAJaxbQNmseCkrS+ioz9qyjazTG0ayNUvMlFaOcd7xWMgTQoxdpQaI6MRYRAFXK9BT4xZe81g7OTgHnBYR2XFKE34TbCjsZ0eD8NIEqu00JR93zFABoBxUPKw== Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Sun, 10 May 2009 08:50:12 +0000 (UTC) X-Auth-Sender: U2FsdGVkX18Bmwu6amCnoWzlZ4SEa9cRubg55eoRLqSrITvYz9PXAw== Cancel-Lock: sha1:RpG9KwGagBq9D1K4sHtGvUN8n2E= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:169040 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64304 Archived-At: Anselm Helbig writes: > At Sat, 09 May 2009 19:05:50 +0100, > Chris Withers wrote: >> >> Peter Dyballa wrote: >> > Once you're root on that system you don't really need to, >> >> Yes, it's root I want to sudo to. >> >> None of the servers I work with allow logging in as root. > > There's a feature in TRAMP to do just that. This used to be called > "multi-hop" but now is configured with `tramp-default-proxies-alist'; > the documentation is still under (info "(tramp) Multi-hops"). Here's > what I have in my .emacs to use it: > > (setq tramp-default-method "ssh") > > (eval-after-load "tramp" > '(when (boundp 'tramp-default-proxies-alist) > (add-to-list 'tramp-default-proxies-alist > '("\\`\\(.*\\.example\\.com\\|somehost\\.example\\.org\\)\\'" > "\\`root\\'" > "/ssh:%h:")))) > > I set things like port and username In my .ssh/config: > > Host *.example.com > User foo > > Host somehost.example.org > User bar > Port 666 > > Now I can do C-x C-f /sudo:www.example.com:/ and work on the > remote host as root. > > HTH, > > Anselm Q: is it only emacs 23 where you don't have to mention sudo at all? e.g I just do: C-x C-f "/root@host:~/.bashrc" and tramp does the rest.