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: Fri, 16 Jan 2015 12:18:42 -0500 Message-ID: <874mrq4pal.fsf@bach.histomat.net> 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 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1421428824 7973 80.91.229.3 (16 Jan 2015 17:20:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2015 17:20: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 Fri Jan 16 18:20: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 1YCAZL-0000ui-2o for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Jan 2015 18:20:23 +0100 Original-Received: from localhost ([::1]:56692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCAZK-0001xZ-9L for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Jan 2015 12:20:22 -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: Fri, 16 Jan 2015 11:18:42 -0600 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:PdyAfXqwtjDGig3nmYXvHHiz5Jo= Original-Lines: 195 X-Usenet-Provider: http://www.giganews.com Original-X-Trace: sv3-ZXOUR9H4gGjpZCnudWq40CynM0lL1GbhkXhrSlPb846X3Owfwvp2+gdvrKDmAVjgRLUUzkey0v1mbF0!x+quOly6g1R6/6/2tvkqjvhgtuJ2nfzMD15KfjX3cgh6ixF0fHL1mJjE71k= 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: 11474 Original-Xref: usenet.stanford.edu gnu.emacs.help:209838 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:102117 Archived-At: Ted Zlatanov writes: > 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. To keep things simple, I customized the auth-source variable to debug and also the tramp-default-method to ftp. Even though I will want to make ssh default, my concern at this point is to get access to web server. I saved the customization. > HB> I now do C-x C-f /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. With SSH to local hosts, I am presently successfully using .authinfo. The reason for ssh showing up in the output is that I was uncertain how to set the method for tramp to use, and to took most conservative choice for the trial run. In my ~/authinfo I have the line: machine Host.com port ftp login Benutzer password Geheim > 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*'). Here is the answer to my question, which the info or man documents did not answer. This defines the FTP method for the tramp sesson, and I assume this overrides any tramp default method I may have set. Running the address returns the request for password, and so .authinfo apparently not used. The only thing in the *Messages* buffer is the report that I've created customization setup. Only when I do RET in lieu of providing a password, do I get a message. 1. Custom settings cannot be saved. Maybe you started Emacs with -q. This indeed is what I'm doing. However, in my tramp init file I have the line (setq auth-source-debug `trivia). 2. Tramp Default Method: ftp. State: EDITED, shown value does not take effect until you set or save it. Nothing here about the tramp session. I put (setq tramp-default-method "ftp") into my tramp init file and run again. After the third RET in liew of password, I get a dump: (ftp-error #("FTP Error: USER request failed: 530 Login incorrect." 32 52 (fontified nil front-sticky (field inhibit-line-move-field-capture) rear-nonsticky t field output inhibit-line-move-field-capture t))) signal(ftp-error (#("FTP Error: USER request failed: 530 Login incorrect." 32 52 (fontified nil front-sticky (field inhibit-line-move-field-capture) rear-nonsticky t field output inhibit-line-move-field-capture t)))) byte-code("\301@A\"\207" [err signal] 3) ange-ftp-hook-function(expand-file-name "/ftp:ussir03@uss-irex.info:" "~/") apply(ange-ftp-hook-function expand-file-name ("/ftp:ussir03@uss-irex.info:" "~/")) tramp-ftp-file-name-handler(expand-file-name "/ftp:ussir03@uss-irex.info:" "~/") apply(tramp-ftp-file-name-handler expand-file-name ("/ftp:ussir03@uss-irex.info:" "~/")) byte-code("\300\301\215\207" [suppress (apply foreign operation args)] 2) #[nil "K\306\211 *\207" [foreign result sf file-name-handler-alist d default-directory nil autoload boundp temporary-file-directory eval standard-value fboundp temp-directory subrp functionp getenv "TEMP" file-directory-p file-name-as-directory "TMP" "TMPDIR" file-exists-p "c:/temp" message "Neither `temporary-file-directory' nor `temp-directory' is defined -- using /tmp." "/tmp" load noerror nomessage non-essential (byte-code "\300\301\215\207" [suppress (apply foreign operation args)] 2) 5 "Non-essential received in operation %s" append (byte-code " < a bunch of hex >\"\fP$*\207" [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string args match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp buffer-name process-buffer tramp-dissect-file-name vectorp tramp-debug-message format "(%d) # " vec-or-proc default-directory] 6) ((error)) tramp-run-real-handler suppress 1 "Suppress received in operation %s" tramp-cleanup x v operation args fmt-string level vec-or-proc tramp-message-show-message] 7]() tramp-file-name-handler(expand-file-name "/ftp:ussir03@uss-irex.info:" "~/") expand-file-name("/ftp:ussir03@uss-irex.info:" "~/") apply(expand-file-name ("/ftp:ussir03@uss-irex.info:" "~/")) tramp-completion-run-real-handler(expand-file-name ("/ftp:ussir03@uss-irex.info:" "~/")) tramp-completion-file-name-handler(expand-file-name "/ftp:ussir03@uss-irex.info:" "~/") file-directory-p("/ftp:ussir03@uss-irex.info:") apply(file-directory-p "/ftp:ussir03@uss-irex.info:") tramp-completion-run-real-handler(file-directory-p ("/ftp:ussir03@uss-irex.info:")) tramp-completion-file-name-handler(file-directory-p "/ftp:ussir03@uss-irex.info:") file-directory-p("/ftp:ussir03@uss-irex.info:") find-file-noselect("/ftp:ussir03@uss-irex.info:" nil nil t) find-file("/ftp:ussir03@uss-irex.info:" t) call-interactively(find-file nil nil) read-string("Password for ussir03@uss-irex.info: " nil t nil) read-passwd("Password for ussir03@uss-irex.info: ") ange-ftp-get-passwd("uss-irex.info" "ussir03") ange-ftp-get-process("uss-irex.info" "ussir03") ange-ftp-host-type("uss-irex.info" "ussir03") ange-ftp-expand-dir("uss-irex.info" "ussir03" "~") ange-ftp-canonize-filename("/ftp:ussir03@uss-irex.info:") ange-ftp-expand-file-name("/ftp:ussir03@uss-irex.info:" nil) apply(ange-ftp-expand-file-name ("/ftp:ussir03@uss-irex.info:" nil)) byte-code("\304\305 \306\216\307\n \"+\207" [debug-on-error save-match-data-internal fn args t match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) apply] 3) ange-ftp-hook-function(expand-file-name "/ftp:ussir03@uss-irex.info:" nil) apply(ange-ftp-hook-function expand-file-name ("/ftp:ussir03@uss-irex.info:" nil)) tramp-ftp-file-name-handler(expand-file-name "/ftp:ussir03@uss-irex.info:" nil) apply(tramp-ftp-file-name-handler expand-file-name ("/ftp:ussir03@uss-irex.info:" nil)) byte-code("\300\301\215\207" [suppress (apply foreign operation args)] 2) #[nil "K\306...\202 *\207" [foreign result sf file-name-handler-alist d default-directory nil autoload boundp temporary-file-directory eval standard-value fboundp temp-directory subrp functionp getenv "TEMP" file-directory-p file-name-as-directory "TMP" "TMPDIR" file-exists-p "c:/temp" message "Neither `temporary-file-directory' nor `temp-directory' is defined -- using /tmp." "/tmp" load noerror nomessage non-essential (byte-code "\300\... $*\207" [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string args match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp buffer-name process-buffer tramp-dissect-file-name vectorp tramp-debug-message format "(%d) # " vec-or-proc default-directory] 6) ((error)) tramp-run-real-handler suppress 1 "Suppress received in operation %s" tramp-cleanup x v operation args fmt-string level vec-or-proc tramp-message-show-message] 7]() funcall(#[nil "K\306...\202 ... *\207" [foreign result sf file-name-handler-alist d default-directory nil autoload boundp temporary-file-directory eval standard-value fboundp temp-directory subrp functionp getenv "TEMP" file-directory-p file-name-as-directory "TMP" "TMPDIR" file-exists-p "c:/temp" message "Neither `temporary-file-directory' nor `temp-directory' is defined -- using /tmp." "/tmp" load noerror nomessage non-essential (byte-code "\300\301\215\207" [suppress (apply foreign operation args)] 2) 5 "Non-essential received in operation %s" append (byte-code " X\205}... *\207" [level tramp-verbose save-match-data-internal tramp-message-show-message fmt-string args match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 3 apply message 0 "" 1 2 "Warning: " "Tramp: " 4 processp buffer-name process-buffer tramp-dissect-file-name vectorp tramp-debug-message format "(%d) # " vec-or-proc default-directory] 6) ((error)) tramp-run-real-handler suppress 1 "Suppress received in operation %s" tramp-cleanup x v operation args fmt-string level vec-or-proc tramp-message-show-message] 7]) tramp-file-name-handler(expand-file-name "/ftp:ussir03@uss-irex.info:" nil) expand-file-name("/ftp:ussir03@uss-irex.info:" nil) apply(expand-file-name ("/ftp:ussir03@uss-irex.info:" nil)) tramp-completion-run-real-handler(expand-file-name ("/ftp:ussir03@uss-irex.info:" nil)) tramp-completion-file-name-handler(expand-file-name "/ftp:ussir03@uss-irex.info:" nil) expand-file-name("/ftp:ussir03@uss-irex.info:") find-file-noselect("/ftp:ussir03@uss-irex.info:" nil nil t) find-file("/ftp:ussir03@uss-irex.info:" t) call-interactively(find-file nil nil) Well, this is a lot. The only thing that strikes me is: find-file("/ftp:ussir03@uss-irex.info:" t) call-interactively(find-file nil nil) read-string("Password for ussir03@uss-irex.info: " nil t nil) read-passwd("Password for ussir03@uss-irex.info: ") It seems it finds .authinfo file but can't read it. $ ls -la | grep authinfo -rw-r--r-- 1 haines haines 1169 Jan 16 11:55 .authinfo The password has a couple "#" characters in it, so I put it into quotation marks, but it didn't help. Haines