[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: run ssh in emacs
From: |
Haines Brown |
Subject: |
Re: run ssh in emacs |
Date: |
Fri, 16 Jan 2015 12:18:42 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
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@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 <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 " < 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
- Re: run ssh in emacs, (continued)
- Re: run ssh in emacs, Michael Albinus, 2015/01/13
- Re: run ssh in emacs, Tory S. Anderson, 2015/01/13
- Re: run ssh in emacs, Haines Brown, 2015/01/13
- Re: run ssh in emacs, Tory S. Anderson, 2015/01/13
- Re: run ssh in emacs, Haines Brown, 2015/01/13
- Re: run ssh in emacs, Bob Proulx, 2015/01/13
- Message not available
- Re: run ssh in emacs, Haines Brown, 2015/01/15
- Re: run ssh in emacs, Ted Zlatanov, 2015/01/15
- Re: run ssh in emacs, Haines Brown, 2015/01/15
- Re: run ssh in emacs, Ted Zlatanov, 2015/01/15
- Re: run ssh in emacs,
Haines Brown <=
- Re: run ssh in emacs, Michael Albinus, 2015/01/16
- Message not available
- Re: run ssh in emacs, Haines Brown, 2015/01/16
- Re: run ssh in emacs, Dan Espen, 2015/01/16
- Re: run ssh in emacs, Michael Albinus, 2015/01/16
- Re: run ssh in emacs, Haines Brown, 2015/01/17
- Re: run ssh in emacs, Michael Albinus, 2015/01/17
- Message not available
- Re: run ssh in emacs, Haines Brown, 2015/01/17
- Re: run ssh in emacs, Dan Espen, 2015/01/17
- Re: run ssh in emacs, Haines Brown, 2015/01/18
- Re: run ssh in emacs, Dan Espen, 2015/01/18