From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.help Subject: Re: run ssh in emacs Date: Thu, 15 Jan 2015 16:10:21 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: References: <87vbkbre16.fsf@bach.histomat.net> <87twzvbxb4.fsf@gmail.com> <20150113123829.GA3285@historicalmaterialism.info> <87egqy3g9k.fsf@gmail.com> <20150113151644.GB3285@historicalmaterialism.info> <87h9vsqab6.fsf@bach.histomat.net> <87d26frdrl.fsf@bach.histomat.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1421356524 18886 80.91.229.3 (15 Jan 2015 21:15:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2015 21:15:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 15 22:15:23 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 1YBrlD-0007Mi-Jh for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2015 22:15:23 +0100 Original-Received: from localhost ([::1]:52967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBrlC-0005Dq-OJ for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2015 16:15:22 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-2.dfn.de!news.dfn.de!storethat.news.telefonica.de!telefonica.de!weretis.net!feeder1.news.weretis.net!news.albasani.net!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 72 Original-X-Trace: news.albasani.net wrWIhlUjFzhAQWqXgUHp8DYCjl0Au2IA9eom9y8CKlXx/2pN86cdW7lgJcsqXAfiEZYdFqW+HDhCldOetV1ymtQhKlYDiQSoN5XZGecu0c+YeCgXPm2UMuRF+ThCqpXP Original-NNTP-Posting-Date: Thu, 15 Jan 2015 21:10:21 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="4ItfWuTqJsSlex34zH0wkCyzbWY8too56+Cc1dxytMPhbVry4S7elSc8KDizSBv6693TymGauubDgK3AH6Y2J7dJ/gGP5NukrERA5zTkzlyp3yupdfsFvPT0W4bqu9Sq"; mail-complaints-to="abuse@albasani.net" User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (darwin) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:w6Z1k2L1lOYo2VfyvyAmkcBry04= sha1:v0WDt0roxEaq+C0989wIhgm+NiE= Original-Xref: usenet.stanford.edu gnu.emacs.help:209826 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:102105 Archived-At: On Thu, 15 Jan 2015 15:26:54 -0500 Haines Brown wrote: HB> Ted Zlatanov writes: >> What does `auth-sources' contain? >> >> Turn `auth-source-debug' to 'trivia to see useful debug logs in >> *Messages*. That will help you figure out what's going wrong, and what >> specifically is needed in the .authinfo file. HB> Thanks, Ted, but I've made no progress. Auth-sources is new to me. I've HB> managed for years without being aware of it. I suppose that's because HB> its defaults suited my needs. Now I'm variouly told it is both a library HB> and a variable, which leaves me uncomfortable. `auth-sources' is a variable (the `quoted' format is standard in the Emacs community). So is `auth-source-debug'. auth-source.el is a library. You may want to consult (info "auth") to learn more about the library. HB> This ~/.emacs.d/elisp/tramp is an init file that has only these lines: HB> (set auth-source-debug `trivia) HB> (setq tramp-default-method "ssh") HB> (require 'auth-source) HB> (customize-variable 'auth-sources) HB> The second line is because I use SSH most often with LAN hosts. The HB> third and fourth lines probably unecessary. Yes, the third is superfluous and the fourth is probably wrong. More importantly, (set auth-source-debug `trivia) is just wrong. You mean to use `setq' there, but you should just customize the variable: `M-x customize-variable RET auth-source-debug' Save the customization. Done. Learn this method and use it for all variables you want to change. The interface is very helpful. Do the same for `tramp-default-method' to set it to "ssh" as you desire. There's no reason to run these only when you use Tramp. HB> I now do C-x C-f /HostName.com: HB> ssh: Could not resolve hostname HostName.com. Name or server not known HB> Tramp: Waiting for prompts... HB> In *Messages* buffer: HB> Loading tramp... done HB> Tramp: Opening Connection for HostName.com using ssh HB> Tramp: Sending command `exec ssh -e None HostName.com Erm, you're using SSH in your example but we started with FTP... With SSH, this will have nothing to do with auth-source. SSH has its own authentication system, typically managed through ssh-agent and so on. HB> Beucase the web server wants the ftp protocol, my .authinfo file has the HB> line: HB> machine HostName.com port ftp login Benutzer password Geheim HB> apparently this value for port is not seen. It seems the authinfo file HB> not being accessed at all, although it is accessed when I SSH to LAN HB> hosts. Set `auth-source-debug' to 'trivia as requested, then open `/ftp:username@hostname.com' and see what shows up in the *Messages* buffer (to see it, type `C-x b *Messages*'). Ted