tramp-devel
[Top][All Lists]
Advanced

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

Using sudo with authinfo file.


From: Michael Jacobson
Subject: Using sudo with authinfo file.
Date: Sun, 15 May 2011 19:31:26 -0500

Hello,

( I apologize for posting an end user question on this list. If this is inappropriate please let me know. I have tried for quite some time to figure out this but have been unable to. )

Prior to emacs 23 I was able to use the following to connect to remote hosts as my user and then sudo to root :

(setq auth-sources '((:source "/home/mike/authinfo" :host t :protocol t)))
(add-to-list 'tramp-default-proxies-alist
    '("192.168.1.120" "\\`root\\'" "/ssh:address@hidden:"))
(find-file "/sudo:192.168.1.120:")



Prior to emacs 23, my password would be looked up correctly in the authinfo file, which contains:
machine 192.168.1.120 login mike password mysecret


Since emacs 23 (including the latest 23.3.1), I am prompted to enter a password to connect to the remote machine. In emacs 22 I can connect without being prompted.
Password for /ssh:address@hidden



Any thoughts on why this is not reading my password from the authinfo file? If I try to connect via "/ssh:192.168.1.120" it reads my authinfo password and connects without prompting me. It is only when using "/sudo" that the I am prompted.  According to http://www.gnu.org/software/tramp/#Multi_002dhops it seems like this should work. Any idea what I am doing wrong?

Thanks,

--Mike

reply via email to

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