From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Haines Brown Newsgroups: gmane.emacs.help Subject: Re: run ssh in emacs Date: Wed, 14 Jan 2015 07:14:09 -0500 Message-ID: <87r3uxr23y.fsf@bach.histomat.net> References: <87vbkbre16.fsf@bach.histomat.net> <87twzvbxb4.fsf@gmail.com> <20150113123829.GA3285@historicalmaterialism.info> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1421237734 31276 80.91.229.3 (14 Jan 2015 12:15:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Jan 2015 12:15:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 14 13:15:29 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YBMr9-0002iX-DD for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jan 2015 13:15:27 +0100 Original-Received: from localhost ([::1]:45799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBMr8-0005S2-Ik for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jan 2015 07:15:26 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Wed, 14 Jan 2015 06:14:09 -0600 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:oBxFpYd3BJnNSjHwo1D+t5veZx0= Original-Lines: 53 X-Usenet-Provider: http://www.giganews.com Original-X-Trace: sv3-2lcNcQqunjEq2jyobqSXxkzuSCGM8Xbzp9hIZGtu5YTpD2bBwEsVilEKEnQ3pUbg/l6cYPOJhYsb/bf!orPh+gJ28fcXxL1Bkjtn+eILj3dXxCoM4dpZFOIi7bXTFE0IwX6aeyWhK8k= Original-X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2875 Original-Xref: usenet.stanford.edu gnu.emacs.help:209785 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:102064 Archived-At: Nikolay Kudryavtsev 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.