From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: tramp sudo or not sudo on remote server Date: Mon, 29 Aug 2011 20:52:00 +0200 Message-ID: <87bov882zz.fsf@gmx.de> References: <87liufcf8y.fsf@ericabrahamsen.net> <8762lha0gy.fsf@gmx.de> <87ipph9cx9.fsf@ericabrahamsen.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1314643938 13581 80.91.229.12 (29 Aug 2011 18:52:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 29 Aug 2011 18:52:18 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Eric Abrahamsen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 29 20:52:14 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qy6wP-00067y-Fl for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Aug 2011 20:52:13 +0200 Original-Received: from localhost ([::1]:34045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy6wP-00016T-01 for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Aug 2011 14:52:13 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:54322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qy6wK-000169-80 for help-gnu-emacs@gnu.org; Mon, 29 Aug 2011 14:52:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qy6wI-0000rG-Gx for help-gnu-emacs@gnu.org; Mon, 29 Aug 2011 14:52:08 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:38054) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Qy6wI-0000ql-0U for help-gnu-emacs@gnu.org; Mon, 29 Aug 2011 14:52:06 -0400 Original-Received: (qmail invoked by alias); 29 Aug 2011 18:52:02 -0000 Original-Received: from p57BB9974.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.153.116] by mail.gmx.net (mp072) with SMTP; 29 Aug 2011 20:52:02 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/hT8wbWZ/hz0H6TE0zFUYgfjdgX0YbKXKKIx1UEK dAAqu6Rm08tVpD In-Reply-To: <87ipph9cx9.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 29 Aug 2011 10:20:02 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.22 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82090 Archived-At: Eric Abrahamsen writes: > Sorry, I think I confused myself by using .ssh/config to define > Host shortcuts for servers, such that "/bl:/path" goes to a certain host as a > certain user. If you don't specifiy a method, likely (the default method) scp is used. That should work fine. For proxy hops, you couldn't use scp, because it is an external method. Hops must always be an internal method, like ssh. So the following shall work: (add-to-list 'tramp-default-proxies-alist '("\\`bl\\'" "\\`root\\'" "/ssh:bl:")) With this, it should be possible to access "/sudo:bl:/path" as root. > Presumably I wouldn't be able to use this trick if I want > to use switch between my regular user and sudo. There are a couple of > awfully long host names, though -- are there any other shortcuts I can > use? See the Tramp manual, section "Frequently Asked Questions". > Thanks again, this at least got it working! > > Eric Best regards, Michael.