[Top][All Lists]

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

Re: editing a file on a remote host as root

From: Chris Withers
Subject: Re: editing a file on a remote host as root
Date: Mon, 04 Jan 2010 09:14:23 +0000
User-agent: Thunderbird (Macintosh/20090812)

Michael Albinus wrote:
The "transit username" (my slang, sorry) is *also* a user on the remote
host. Sudoing on another host is always done by two steps:

- Connect to the remote host with a username who is allowed to receive a
  remote connection, by whatever method (ssh, rsh, telnet, ...). This
  user I call "transit user".

- Inside that remote session, apply "su" or "sudo", as you like, to the
  remote user you want to work as.

So there are two different users "in use" on the remote machine. Maybe a

 +-----------+      +------------+
 |           | ---> | transit@   |--+
 | you@      | ssh  +------------+  | sudo
 |           |      | user@      |<-+
 +-----------+      +------------+
   localhost          remotehost

In fact, this is needed only when the "remote user" cannot be accessed
via the method used in the first step; otherwise you could just go this
direct way.

Or, as you said, "when the transit username is the same as that of the
user on the remote machine", you just apply ssh to that user on the
remote host, and no sudo is needed at all.

Okay, I understand this now, but why does the (more sensible and explicit) option of doing:


...not work?

Where omitting "transit" would mean it would be set to the current username ("you" in your example above) and omitting "user" would default to "root".

With that in place, I shouldn't need any configuration in .emacs at all!



Simplistix - Content Management, Batch Processing & Python Consulting

reply via email to

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