help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: remote file editing over ssh with emacs 22.3.1 on Windows


From: Chris Withers
Subject: Re: remote file editing over ssh with emacs 22.3.1 on Windows
Date: Mon, 25 May 2009 16:44:23 +0100
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]