From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anselm Helbig Newsgroups: gmane.emacs.help Subject: Re: remote file editing over ssh with emacs 22.3.1 on Windows Date: Sun, 10 May 2009 10:43:30 +0200 Organization: Freie Universitaet Berlin Message-ID: <87prehic0d.wl%anselm.helbig+news2009@googlemail.com> 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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1241948595 5918 80.91.229.12 (10 May 2009 09:43:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 May 2009 09:43:15 +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:43:07 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 1M35Yn-0003SX-2Q for geh-help-gnu-emacs@m.gmane.org; Sun, 10 May 2009 11:43:05 +0200 Original-Received: from localhost ([127.0.0.1]:46596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M35Yl-0007E8-Dz for geh-help-gnu-emacs@m.gmane.org; Sun, 10 May 2009 05:43:03 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 44 Original-X-Trace: news.uni-berlin.de 9NLckJAmWtfjoi/MZnVoAQBUL64sAS+DPRkhJNvWJKXKM9QgyqLYWWr3nS Cancel-Lock: sha1:NOr7KQzZRSMMNkxiQ7z3RuUnzQQ= In-Reply-To: Mail-Followup-To: anselm.helbig+news2009@googlemail.com User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.3 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) Original-Xref: news.stanford.edu gnu.emacs.help:169037 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:64302 Archived-At: 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 -- Anselm Helbig mailto:anselm.helbig+news2009@googlemail.com