From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Barton Newsgroups: gmane.emacs.help Subject: Re: Tramp ssh Authentication Problem. Date: Sun, 08 Jun 2014 12:45:02 +0100 Message-ID: <53944CBE.5030107@wilkesley.net> References: <53941A38.7040306@wilkesley.net> Reply-To: ian@manor-farm.org NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1402227949 16712 80.91.229.3 (8 Jun 2014 11:45:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 8 Jun 2014 11:45:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jun 08 13:45:44 2014 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 1WtbXj-0008UW-Ub for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jun 2014 13:45:44 +0200 Original-Received: from localhost ([::1]:55108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtbXj-00057b-2M for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jun 2014 07:45:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtbXD-00057U-Pp for help-gnu-emacs@gnu.org; Sun, 08 Jun 2014 07:45:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WtbX8-0004As-N7 for help-gnu-emacs@gnu.org; Sun, 08 Jun 2014 07:45:11 -0400 Original-Received: from mail2.wilkesley.net ([109.74.196.44]:33141 helo=li40-130.members.linode.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WtbX8-00048q-Dy for help-gnu-emacs@gnu.org; Sun, 08 Jun 2014 07:45:06 -0400 Original-Received: from scamper2.bantercat.co.uk (unknown [46.33.134.31]) (Authenticated sender: lists@wilkesley.net) by li40-130.members.linode.com (Postfix) with ESMTPSA id 9F74510E80E for ; Sun, 8 Jun 2014 11:45:04 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 In-Reply-To: <53941A38.7040306@wilkesley.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 109.74.196.44 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:98094 Archived-At: On 08/06/14 09:09, Ian Barton wrote: > I am having some problems with Tramp logging in to remote servers. In > my ~/.ssh/config I have: > > Host blacky.wilkesley.net > IdentityFile ~/.ssh/id_rsa_blacky_linode > Host wilkesley.org > IdentityFile ~/.ssh/id_rsa_linode_ian > > I can login to either host using ssh wilkesley.org or ssh > blacky.wilkesley.org. However, tramp logs in OK to wilkesley.org, but > *not* to blacky.wilkesley.net. > > If I use the following minimal init file: > > (setq tramp-shell-prompt-pattern "^[^$>\n]*[#$%>]*\\(\[[0-9;]*[a-zA-Z] > *\\)*") > (eval-after-load 'tramp '(setenv "SHELL" "/bin/bash")) > (setq tramp-default-method "ssh") > (setq tramp-verbose 10) > > I get the following in the Tramp log when I try to login to > blacky.wilkesley.net: > > 08:52:15.819432 tramp-process-one-action (5) # Looking for regexp > "\(^.*\([pP]assword\|[pP]assphrase\).*:? *\)\'" from remote shell > 08:52:15.819650 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.819878 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.820211 tramp-process-one-action (5) # Looking for regexp > "\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification > failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o > supported authentication methods left to try!\)\|Permission > denied\|\(?:Sorry, try again\|Timeout, server not > responding\)\.\).*\|^.*\(Received signal [0-9]+\).*\)\'" from remote shell > 08:52:15.820469 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.820697 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.820936 tramp-process-one-action (5) # Looking for regexp > "\(^[^#$%> > ]*[#$%>] *\)\'" from remote shell > 08:52:15.821198 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.821426 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.821635 tramp-process-one-action (5) # Looking for regexp "\(^[^$> > ]*[#$%>]*\([[0-9;]*[a-zA-Z] *\)*\)\'" from remote shell > 08:52:15.821866 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.822092 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.822339 tramp-process-one-action (5) # Looking for regexp > "\(\(Are you sure you want to continue connecting (yes/no)\?\)\s-*\)\'" > from remote shell > 08:52:15.822574 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.822799 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.823010 tramp-process-one-action (5) # Looking for regexp > "\(\(\(?:Store key in cache\? (y/\|Update cached key\? (y/n, Return > cancels connectio\)n)\)\s-*\)\'" from remote shell > 08:52:15.823245 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.823502 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.823690 tramp-process-one-action (5) # Looking for regexp > "\(\(TERM = (.*)\|Terminal type\? \[.*\]\)\s-*\)\'" from remote shell > 08:52:15.823906 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.824101 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.824277 tramp-process-one-action (5) # Looking for regexp > "\(\)\'" from remote shell > 08:52:15.824489 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.838558 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:15.838773 tramp-process-one-action (5) # Call > `tramp-action-process-alive' > 08:52:15.838968 tramp-accept-process-output (10) # *tramp/ssh > blacky.wilkesley.net* run > 08:52:16.757812 tramp-accept-process-output (10) # > #$ Last login: Sun Jun 8 08:51:51 2014 from 46.33.134.31 > 08:52:16.758055 tramp-process-one-action (5) # Looking for regexp > "\(.*ogin\( .*\)?: *\)\'" from remote shell > 08:52:16.758317 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:16.758556 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:16.758985 tramp-process-one-action (5) # Looking for regexp > "\(^.*\([pP]assword\|[pP]assphrase\).*:? *\)\'" from remote shell > 08:52:16.759223 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:16.759454 tramp-get-connection-property (7) # check-remote-echo nil > 08:52:16.759688 tramp-process-one-action (5) # Looking for regexp > "\(^.*\(Connection \(?:\(?:clo\|refu\)sed\)\|Host key verification > failed\.\|Login \(?:[Ii]ncorrect\)\|N\(?:ame or service not known\|o > supported authentication methods left to try!\)\|Permission > denied\|\(?:Sorry, try again\|Timeout, server not > responding\)\.\).*\|^.*\(Received signal [0-9]+\).*\)\'" from remote shell > > For some reason it looks as thought the host key verification is > failing, but I can't see why. > > Ian. > A bit more information. Here is the log from the serer when tramp fails to login: Jun 08 12:41:28 blacky.wilkesley.net sshd[19722]: Set /proc/self/oom_score_adj to 0 Jun 08 12:41:28 blacky.wilkesley.net sshd[19722]: Connection from 46.33.134.31 port 51580 on 178.79.179.180 port 22 Jun 08 12:41:29 blacky.wilkesley.net sshd[19722]: reverse mapping checking getaddrinfo for dsl-fixed-46-33-134-31.interdsl.co.uk [46.33.134.31] failed - POSSIBLE BREAK-IN ATTEMPT! Jun 08 12:41:29 blacky.wilkesley.net sshd[19722]: Postponed publickey for ian from 46.33.134.31 port 51580 ssh2 [preauth] Jun 08 12:41:29 blacky.wilkesley.net sshd[19722]: Accepted publickey for ian from 46.33.134.31 port 51580 ssh2: RSA d2:4d:8c:36:40:84:7e:b1:d5:3a:39:37:fe:2f:31:1e Jun 08 12:41:29 blacky.wilkesley.net sshd[19722]: pam_unix(sshd:session): session opened for user ian by (uid=0) It appears that the public key is accepted OK, but Tramp just hangs. The sshd config file is identical on the server that works and the one that doesn't. Ian.