all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Haines Brown <haines@histomat.net>
To: help-gnu-emacs@gnu.org
Subject: Re: run ssh in emacs
Date: Fri, 16 Jan 2015 12:18:42 -0500	[thread overview]
Message-ID: <874mrq4pal.fsf@bach.histomat.net> (raw)
In-Reply-To: m24mrr92de.fsf@lifelogs.com

Ted Zlatanov <tzz@lifelogs.com> 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\b@\bA\"\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 "\bK\306\211 <now comes a bunch of hex> *\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 "\b < 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\b\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\v\"+\207" [debug-on-error
  save-match-data-internal fn args t match-data ((byte-code
  "\301\b\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 "\bK\306...\202\x01 *\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\b\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
  "\bK\306...\202\x01 ... *\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 "\b
  X\205}... *\207" [level tramp-verbose save-match-data-internal
  tramp-message-show-message fmt-string args match-data ((byte-code
  "\301\b\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


  reply	other threads:[~2015-01-16 17:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-12 19:32 run ssh in emacs Haines Brown
2015-01-12 19:42 ` Tory S. Anderson
2015-01-13 12:38   ` Haines Brown
2015-01-13 13:04     ` Nikolay Kudryavtsev
2015-01-13 13:18       ` Tory S. Anderson
2015-01-13 13:21       ` Michael Albinus
2015-01-13 13:18     ` Tory S. Anderson
2015-01-13 13:28       ` Michael Albinus
2015-01-13 14:29     ` Tory S. Anderson
2015-01-13 15:16       ` Haines Brown
2015-01-13 15:23         ` Tory S. Anderson
2015-01-13 18:11           ` Haines Brown
2015-01-14  4:26             ` Bob Proulx
     [not found]         ` <mailman.17817.1421162618.1147.help-gnu-emacs@gnu.org>
2015-01-15 16:26           ` Haines Brown
2015-01-15 17:19             ` Ted Zlatanov
2015-01-15 20:26               ` Haines Brown
2015-01-15 21:10                 ` Ted Zlatanov
2015-01-16 17:18                   ` Haines Brown [this message]
2015-01-16 19:59                     ` Michael Albinus
     [not found]                     ` <mailman.18043.1421438398.1147.help-gnu-emacs@gnu.org>
2015-01-16 20:55                       ` Haines Brown
2015-01-16 21:34                         ` Dan Espen
2015-01-16 21:36                         ` Michael Albinus
2015-01-17 12:17                           ` Haines Brown
2015-01-17 17:12                             ` Michael Albinus
     [not found]                             ` <mailman.18073.1421514787.1147.help-gnu-emacs@gnu.org>
2015-01-17 20:15                               ` Haines Brown
2015-01-17 23:32                                 ` Dan Espen
2015-01-18 12:29                                   ` Haines Brown
2015-01-19  2:15                                     ` Dan Espen
     [not found]                           ` <mailman.18064.1421497097.1147.help-gnu-emacs@gnu.org>
2015-01-17 14:13                             ` Dan Espen
     [not found]       ` <mailman.17814.1421162216.1147.help-gnu-emacs@gnu.org>
2015-01-13 16:59         ` Dan Espen
     [not found]     ` <mailman.17800.1421154285.1147.help-gnu-emacs@gnu.org>
2015-01-14 12:14       ` Haines Brown
2015-01-14 19:55         ` Bob Proulx

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874mrq4pal.fsf@bach.histomat.net \
    --to=haines@histomat.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.