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

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

Re: run ssh in emacs


From: Haines Brown
Subject: Re: run ssh in emacs
Date: Wed, 14 Jan 2015 07:14:09 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com> writes:

> Tramp methods are defined in tramp. See C-h v tramp-methods. And did
> you mean scp?
>
> To save password in tramp you can put your login and password into a
> file called ~/.authinfo.gpg in this format: machine anon login root
> password my-password

Nikolay, your advice much appreciated, and I did make progress. I set
the method to ssh in tramp initiation file. I now use ~/.authinfo and
can readily log in to the remote LAN machine. However, this automated
transmission of the password works only for users, not if the user is
"root".

For example, if in ~/.authinfo I have the stanza:

    machine target
      login root
      password Geheim

When in emacs I do C-x C-f /root@target: or /target:, I'm prompted for
the password. The password was transmitted for user accounts but not for
the root account.

I need to ssh as root because my aim is to use emacs dired to copy files
belonging to root between the target and the local machines. I can su to
root and then start emacs, but this session for some reason does not use
the tramp init file.

The manual says I can use (set auth-source-debug `t). I put this line in my
tramp init file, but where is its output?

I here toss in an observation that is irrevant. If the method is news, I
find that the stanza in .authinfo must be inline, such as:

    machine news.giganews.com login Benutzer password Geheim

  If I arrange this in a column as in the "target" example above, it
  does not work.

Haines






>
> Authinfo is protected by gpg, so you gonna get asked for a password for it,
> but just once.
>
> Alternatively you can use authorization by key.


reply via email to

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