From MAILER-DAEMON Mon Jul 25 07:12:09 2005
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Dx0sT-0004f2-I8
	for mharc-sshproxy-dev@gnu.org; Mon, 25 Jul 2005 07:12:09 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Dx0V7-0005Dn-Pl
	for sshproxy-dev@nongnu.org; Mon, 25 Jul 2005 06:48:01 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Dx0V4-0005CP-Sv
	for sshproxy-dev@nongnu.org; Mon, 25 Jul 2005 06:48:00 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Dx0V4-0005Aq-D3
	for sshproxy-dev@nongnu.org; Mon, 25 Jul 2005 06:47:58 -0400
Received: from [82.226.176.41] (helo=paris.office.wallix.com)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dx0bE-0004MV-A4
	for sshproxy-dev@nongnu.org; Mon, 25 Jul 2005 06:54:21 -0400
Received: from localhost (localhost.localdomain [127.0.0.1])
	by paris.office.wallix.com (Postfix) with ESMTP id 4CC0C18B3A3;
	Mon, 25 Jul 2005 12:43:23 +0200 (CEST)
Received: from paris.office.wallix.com ([127.0.0.1])
	by localhost (com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
	id 02763-01; Mon, 25 Jul 2005 12:43:22 +0200 (CEST)
Received: from pong.wallix.lan (unknown [192.168.10.24])
	by paris.office.wallix.com (Postfix) with ESMTP id 5A5E618B3A2;
	Mon, 25 Jul 2005 12:43:22 +0200 (CEST)
From: David Guerizec <dguerizec@wallix.com>
To: Kalina Detko <kruwka@interia.pl>
Date: Mon, 25 Jul 2005 12:43:11 +0200
User-Agent: KMail/1.8.1
References: <42E2D671.4070801@interia.pl>
In-Reply-To: <42E2D671.4070801@interia.pl>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Message-Id: <200507251243.11328.dguerizec@wallix.com>
X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at wallix.com
X-Mailman-Approved-At: Mon, 25 Jul 2005 07:12:08 -0400
Cc: sshproxy-dev@nongnu.org
Subject: [sshproxy-dev] Re: SSHproxy - 'Incompatible ssh peer' error
X-BeenThere: sshproxy-dev@nongnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SSH proxy developer list <sshproxy-dev.nongnu.org>
List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/sshproxy-dev>
List-Post: <mailto:sshproxy-dev@nongnu.org>
List-Help: <mailto:sshproxy-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Jul 2005 10:48:02 -0000

Le Dimanche 24 Juillet 2005 01:44, vous avez =E9crit=A0:
> Hello,
>
> Thanks for the savannah access.
>
> Unfortunately, I'm getting a strange error and have no idea how to fix it.
>
> I've added a new entry into 'site' table - with name =3D my computer's
> hostname and ip_address =3D my computer's IP. Then, I've added my login
> and password to my computer to the 'user' table (with appropriate site_id=
).
> I run the server and then I try to run the client... and I get such error:
> Incompatible ssh peer (no acceptable host key)
>
> I could understand this problem if it was a remote host, but I'm trying
> to ssh from my localhost to localhost. I've tried 'ssh my_hostname'
> before, so the RSA key already exists - how could there be any mismatch?
>
> Of course, connecting with a real, external server causes the same error.
>
> Do you have any ideas, how to fix this?

I think yes.

=46irst, note that RSA is not used by the proxy, and SSH protocol 2 must be=
=20
enabled on the remote host (Protocol 2 in /etc/ssh/sshd_config).
Support for protocol 1 is not planned due to security risks, and support fo=
r=20
RSA is not yet planned, but could be in the future.

Then ensure you have created the configuration directory $HOME/.sshproxy an=
d=20
created a DSA key pair with the following command:

$ ssh-keygen -t dsa -f $HOME/.sshproxy/id_dsa

=46inally, you have to have the proxy host key in the $HOME/.ssh/known_host=
s=20
file.
To do this, the simpler is to create a new entry in your /etc/hosts file:

(type this as root)
# echo '127.0.0.1 ssh-proxy' >> /etc/hosts

then, as your user, type:

$ ssh -p 2242 ssh-proxy

if it asks if it can add the host key to your known_hosts file, type y, the=
n=20
you can kill it by Control-C.

You should now be ready to retry the SSH client with the following command:

$ ./SSH -P kalina@ssh-proxy kalina@localhost

Tell me if it still doesn't work.

David

PS: I added your email to the sshproxy-dev mailing list, all communication =
on=20
this subject will take place there.




From MAILER-DAEMON Mon Jul 25 16:06:12 2005
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Dx9DF-0002Im-S9
	for mharc-sshproxy-dev@gnu.org; Mon, 25 Jul 2005 16:06:10 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1Dx9DC-0002Go-9F
	for sshproxy-dev@nongnu.org; Mon, 25 Jul 2005 16:06:07 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1Dx9D7-0002FA-OE
	for sshproxy-dev@nongnu.org; Mon, 25 Jul 2005 16:06:02 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Dx9D7-0001rz-7s
	for sshproxy-dev@nongnu.org; Mon, 25 Jul 2005 16:06:01 -0400
Received: from [213.25.80.232] (helo=smtp.poczta.interia.pl)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dx975-0004j4-9M
	for sshproxy-dev@nongnu.org; Mon, 25 Jul 2005 15:59:49 -0400
Received: by smtp.poczta.interia.pl (INTERIA.PL, from userid 502)
	id BDF63D1137; Mon, 25 Jul 2005 21:31:27 +0200 (CEST)
Received: from poczta.interia.pl (mi01.poczta.interia.pl [10.217.12.1])
	by smtp.poczta.interia.pl (INTERIA.PL) with ESMTP id 4AE51D1036
	for <sshproxy-dev@nongnu.org>; Mon, 25 Jul 2005 21:31:27 +0200 (CEST)
Received: by poczta.interia.pl (INTERIA.PL, from userid 502)
	id C0C8626F83E; Mon, 25 Jul 2005 21:31:26 +0200 (CEST)
Received: from [10.0.0.102] (host146-193-110-229.limes.com.pl
	[193.110.229.146])
	by poczta.interia.pl (INTERIA.PL) with ESMTP id 5A62A26F837
	for <sshproxy-dev@nongnu.org>; Mon, 25 Jul 2005 21:31:26 +0200 (CEST)
Message-ID: <42E53E0D.2090809@interia.pl>
Date: Mon, 25 Jul 2005 21:31:25 +0200
From: Kalina Detko <kruwka@interia.pl>
User-Agent: Debian Thunderbird 1.0.2 (X11/20050602)
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: sshproxy-dev@nongnu.org
References: <42E2D671.4070801@interia.pl>
	<200507251243.11328.dguerizec@wallix.com>
In-Reply-To: <200507251243.11328.dguerizec@wallix.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-EMID: 87beeacc
Content-Transfer-Encoding: quoted-printable
Subject: [sshproxy-dev] Re: SSHproxy - 'Incompatible ssh peer' error
X-BeenThere: sshproxy-dev@nongnu.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SSH proxy developer list <sshproxy-dev.nongnu.org>
List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/sshproxy-dev>
List-Post: <mailto:sshproxy-dev@nongnu.org>
List-Help: <mailto:sshproxy-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Jul 2005 20:06:08 -0000

David Guerizec wrote:
> Le Dimanche 24 Juillet 2005 01:44, vous avez =E9crit :
>>
>>Unfortunately, I'm getting a strange error and have no idea how to fix =
it.
>>
>>I've added a new entry into 'site' table - with name =3D my computer's
>>hostname and ip_address =3D my computer's IP. Then, I've added my login
>>and password to my computer to the 'user' table (with appropriate site_=
id).
>>I run the server and then I try to run the client... and I get such err=
or:
>>Incompatible ssh peer (no acceptable host key)
>>
>>I could understand this problem if it was a remote host, but I'm trying
>>to ssh from my localhost to localhost. I've tried 'ssh my_hostname'
>>before, so the RSA key already exists - how could there be any mismatch=
?
>>
>>Of course, connecting with a real, external server causes the same erro=
r.
>>
>>Do you have any ideas, how to fix this?
>=20
>=20
> I think yes.
>=20
> First, note that RSA is not used by the proxy, and SSH protocol 2 must =
be=20
> enabled on the remote host (Protocol 2 in /etc/ssh/sshd_config).
As remote host in this case is localhost, i've checked:
$ grep -i proto /etc/ssh/sshd_config | grep -v ^#
Protocol 2

> Support for protocol 1 is not planned due to security risks, and suppor=
t for=20
> RSA is not yet planned, but could be in the future.
>=20
> Then ensure you have created the configuration directory $HOME/.sshprox=
y and=20
> created a DSA key pair with the following command:
>=20
> $ ssh-keygen -t dsa -f $HOME/.sshproxy/id_dsa
I've had generated this key before, but to be sure, I've done it again.

>=20
> Finally, you have to have the proxy host key in the $HOME/.ssh/known_ho=
sts=20
> file.
> To do this, the simpler is to create a new entry in your /etc/hosts fil=
e:
>=20
> (type this as root)
> # echo '127.0.0.1 ssh-proxy' >> /etc/hosts
$ grep ssh-proxy /etc/hosts
127.0.0.1 ssh-proxy

>=20
> then, as your user, type:
>=20
> $ ssh -p 2242 ssh-proxy
Why port 2242? My sshd listens on 22.

>=20
> if it asks if it can add the host key to your known_hosts file, type y,=
 then=20
> you can kill it by Control-C.
Done.
I have either 127.0.0.1, my non-loopback address, my hostname and=20
'localhost' in known_hosts file.

>=20
> You should now be ready to retry the SSH client with the following comm=
and:
>=20
> $ ./SSH -P kalina@ssh-proxy kalina@localhost
I've added also 'ssh-proxy' to 'sites' mysql table, and my login to=20
'user' table. Then:
$ ./SSH -P kala@localhost kala@ssh-proxy
Password:
Incompatible ssh peer (no acceptable host key)

Your example:

$ ./SSH -P kala@ssh-proxy kala@localhost
Password:
Traceback (most recent call last):
(...python traceback...)
AttributeError: SSHClient instance has no attribute 'hostkey'

Understandable - my hostname is not 'ssh-proxy'.
Another try:

$ ./SSH -P kala@kala-fiorek kala@localhost
Password:
Incompatible ssh peer (no acceptable host key)

>=20
> Tell me if it still doesn't work.
For me - it looks like my computer doesn't like paramiko ;-)
Maybe I should ask on the paramiko mailing list?
I've found this exception in paramiko sources, but there is no more=20
explanation in the code - just that some key doesn't match other key.

Do you have any other ideas?

--=20
Kalina

----------------------------------------------------------------------
Najlepszy serwis MOTO w Polsce! >>> http://link.interia.pl/f18a8




From MAILER-DAEMON Mon Jul 25 18:02:44 2005
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1DxB22-0003nZ-DS
	for mharc-sshproxy-dev@gnu.org; Mon, 25 Jul 2005 18:02:42 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1DxB1v-0003jO-4d
	for sshproxy-dev@nongnu.org; Mon, 25 Jul 2005 18:02:35 -0400
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1DxB1o-0003gi-K2
	for sshproxy-dev@nongnu.org; Mon, 25 Jul 2005 18:02:30 -0400
Received: from [199.232.76.173] (helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1DxB1o-0003fj-Dt
	for sshproxy-dev@nongnu.org; Mon, 25 Jul 2005 18:02:28 -0400
Received: from [82.224.116.133] (helo=mail.guerizec.net)
	by monty-python.gnu.org with esmtp (Exim 4.34) id 1DxB8L-0004PY-MH
	for sshproxy-dev@nongnu.org; Mon, 25 Jul 2005 18:09:13 -0400
Received: from guerizec.net (localhost [127.0.0.1])
	by guerizec.net (Postfix) with ESMTP id CCE401E9B2E
	for <sshproxy-dev@nongnu.org>; Mon, 25 Jul 2005 23:56:51 +0200 (CEST)
Received: from 82.224.116.133
	(SquirrelMail authenticated user david@guerizec.net)
	by guerizec.net with HTTP; Mon, 25 Jul 2005 23:56:51 +0200 (CEST)
Message-ID: <49854.82.224.116.133.1122328611.squirrel@guerizec.net>
In-Reply-To: <42E53E0D.2090809@interia.pl>
References: <42E2D671.4070801@interia.pl>
	<200507251243.11328.dguerizec@wallix.com>
	<42E53E0D.2090809@interia.pl>
Date: Mon, 25 Jul 2005 23:56:51 +0200 (CEST)
Subject: Re: [sshproxy-dev] Re: SSHproxy - 'Incompatible ssh peer' error
From: "David Guerizec" <david@guerizec.net>
To: sshproxy-dev@nongnu.org
User-Agent: SquirrelMail/1.4.5
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
X-Priority: 3 (Normal)
Importance: Normal
Content-Transfer-Encoding: quoted-printable
X-BeenThere: sshproxy-dev@nongnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: David Guerizec <david@guerizec.net>
List-Id: SSH proxy developer list <sshproxy-dev.nongnu.org>
List-Unsubscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/pipermail/sshproxy-dev>
List-Post: <mailto:sshproxy-dev@nongnu.org>
List-Help: <mailto:sshproxy-dev-request@nongnu.org?subject=help>
List-Subscribe: <http://lists.nongnu.org/mailman/listinfo/sshproxy-dev>,
	<mailto:sshproxy-dev-request@nongnu.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Jul 2005 22:02:38 -0000

Hi Kalina,

> Do you have any other ideas?

Well, other than what I said, not really, but I was able to reproduce the
error on a clean machine where I just installed paramiko and sshproxy.

I think I fixed it, and I commited a patch in CVS. Can you retry with the
latest version of the CVS ?

BTW, from your last mail you seem to misunderstand the syntax of SSH. The
-P parameter is to specify the proxy on which you want to connect to reac=
h
the remote host. So:

$ ./SSH -P login@sshproxy user@site

where login is taken from login.uid in the database, sshproxy is the name
or the IP of the proxy, user is taken from user.uid, and site is taken
from site.name.

site.name is not necessarily a real name, just a symbolic name. Moreover,
it can contain characters not allowed in DNS like '_'.

Have a good night.

David




