[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: run ssh in emacs
From: |
Ted Zlatanov |
Subject: |
Re: run ssh in emacs |
Date: |
Thu, 15 Jan 2015 16:10:21 -0500 |
User-agent: |
Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (darwin) |
On Thu, 15 Jan 2015 15:26:54 -0500 Haines Brown <haines@histomat.net> wrote:
HB> Ted Zlatanov <tzz@lifelogs.com> 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
- Re: run ssh in emacs, (continued)
- 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 <=
- Re: run ssh in emacs, Haines Brown, 2015/01/16
- 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