From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Withers Newsgroups: gmane.emacs.help Subject: Re: remote file editing over ssh with emacs 22.3.1 on Windows Date: Mon, 25 May 2009 16:44:23 +0100 Message-ID: <4A1ABCD7.1050408@simplistix.co.uk> 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> <83y6t6bp8l.fsf@gnu.org> <4A05C052.10607@simplistix.co.uk> <83bpq2ytya.fsf@gnu.org> <87fxfbibjr.wl%anselm.helbig+news2009@googlemail.com> <8763g0hpsc.wl%anselm.helbig+news2009@googlemail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1243268253 17935 80.91.229.12 (25 May 2009 16:17:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 May 2009 16:17:33 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: anselm.helbig+news2009@googlemail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 25 18:17: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 1M8cre-0003nB-3V for geh-help-gnu-emacs@m.gmane.org; Mon, 25 May 2009 18:17:26 +0200 Original-Received: from localhost ([127.0.0.1]:36197 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8crd-0003rQ-FJ for geh-help-gnu-emacs@m.gmane.org; Mon, 25 May 2009 12:17:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M8cLi-0006Gk-NE for help-gnu-emacs@gnu.org; Mon, 25 May 2009 11:44:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M8cLh-0006GA-BH for help-gnu-emacs@gnu.org; Mon, 25 May 2009 11:44:25 -0400 Original-Received: from [199.232.76.173] (port=49474 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8cLg-0006G3-Ue for help-gnu-emacs@gnu.org; Mon, 25 May 2009 11:44:25 -0400 Original-Received: from server1.simplistix.co.uk ([89.151.125.140]:37186) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M8cLg-0003iA-Hp for help-gnu-emacs@gnu.org; Mon, 25 May 2009 11:44:24 -0400 Original-Received: from [192.168.1.15] (cust162-dsl93-89-128.idnet.net [93.89.128.162]) by server1.simplistix.co.uk (Postfix) with ESMTPSA id DA6724F8075; Mon, 25 May 2009 16:44:23 +0100 (BST) User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <8763g0hpsc.wl%anselm.helbig+news2009@googlemail.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:64699 Archived-At: Anselm Helbig wrote: >> Is there no way I can specify both the username to use to log in with >> *and* the username to sudo to as part of the C-x C-f process? > > Unfortunately this is no longer possible. Did it used to be? If so, how? And why was it changed? > An easier way to maintain > the user/hostname information is to keep it all in you ssh > configuration file, ~/.ssh/config. ...except that I'm using Putty, because I'm on Windows, and no I can't change that. > then "ssh foo" would be equivalent to "ssh chris@foo.example.com" and > "ssh bar" would do the same thing as "ssh www@foo.example.com". If I could use putty environment names, like I can with the svn client, that would rock :-) (except that I don't have the sudo to root bit in my putty environments, 'cos that feels like a bad idea to me, so I'm still left with that problem...) > But this basically boils down to the same thing, that you have to > maintain your user/host mapping in a configuration file. ...which is sucky :-( > If you always > need to do sudo to login as root you can use a generic proxy template > like this > > (add-to-list 'tramp-default-proxies-alist > '("\\`.*\\'" "\\`root\\'" "/ssh:%h:")) What would I type in C-x C-f to use this template? > How many user/host-combinations do you have? Let's find a practical > solution for this! around 20-40 username/host combinations, and it's not a limited list. If a customer adds a new server, or if I need to ssh to a machine for a one off config change, I don't want to have to go trawling through config files... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk