Re: ssh public key auth. incompatible between 2.3.0 vs. 2.9?

2001-05-13 Thread David Wolfskill

>Date: Sun, 13 May 2001 05:45:12 -0700 (PDT)
>From: David Wolfskill <[EMAIL PROTECTED]>

>>Date: Sat, 12 May 2001 23:40:52 -0700
>>From: Alfred Perlstein <[EMAIL PROTECTED]>

>>> So basically, I'm confused.  ssh appears to work ok for password
>>> authentication, but not for public key authentication -- or at least, it
>>> doesn't appear to be (completely?) compatible with ssh 2.3.0.  Or maybe
>>> I'm overlooking something...?

>>Brian Feldman switched the default to ssh2, for some reason it doesn't
>>back off and try version 1.  you need to do this "ssh -1 " which
>>is damn irritating, but I don't know of any other option.

>The "-1" flag does not appear to be valid for ssh 2.9; attempting its
>use generates a usage message.

Brain-o, there on my part -- that was 2.3.0 that didn't cope with "-1".
2.9 honored it OK, and once I responded affirmatively to:

The authenticity of host 'bunrab.catwhisker.org (172.16.8.11)' can't be established.
RSA1 key fingerprint is 42:a4:6d:32:b1:57:09:81:2c:c5:86:70:61:0b:7c:fe.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'bunrab.catwhisker.org' (RSA1) to the list of known hosts.

it seems to have allowed public key authentication.

However, the fact that I got that little dialog would appear to indicate
that this really isn't a V1 vs. V2 protocol issue per se, unless I'm confused.

>>Would it be possible to try version 1 before password?

>I'll give that a try later today.  (I'm building today's -STABLE at the
>moment

-STABLE built OK; I'm building -CURRENT now.

So while it's building

I tried creating ~/.ssh/config, and specified "Protocol 1,2" in it.

Prior to doing this, attempting to use ssh from -CURRENT to a local
SPARCstation was handled same as ssh to my FreeBSD 3.2-R box:  public
key authentication appeared to want a file I don't have (since my keys
are in ~/.ssh/identity{,.pub}, and it's looking for ~/.ssh/id_{r,d}sa:

dhcp-140[1] ssh -v pogo
OpenSSH_2.9 [EMAIL PROTECTED] 20010503, SSH protocols 1.5/2.0, OpenSSL 0x00906010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: restore_uid
debug1: ssh_connect: getuid 1001 geteuid 1001 anon 1
debug1: Connecting to pogo.catwhisker.org [172.16.8.12] port 22.
debug1: temporarily_use_uid: 1001/20 (e=1001)
debug1: restore_uid
debug1: temporarily_use_uid: 1001/20 (e=1001)
debug1: restore_uid
debug1: Connection established.
debug1: identity file /home/david/.ssh/identity type 0
debug1: identity file /home/david/.ssh/id_rsa type -1
debug1: identity file /home/david/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_2.5.1p2
debug1: match: OpenSSH_2.5.1p2 pat ^OpenSSH_2\.5\.[012]
Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_2.9 [EMAIL PROTECTED] 20010503
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST_OLD sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: dh_gen_key: priv key bits set: 137/256
debug1: bits set: 1049/2049
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'pogo.catwhisker.org' is known and matches the DSA host key.
debug1: Found key in /home/david/.ssh/known_hosts2:2
debug1: bits set: 1044/2049
debug1: len 55 datafellows 49152
debug1: ssh_dss_verify: signature correct
debug1: kex_derive_keys
debug1: newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: waiting for SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: done: ssh_kex2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: service_accept: ssh-userauth
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: authentications that can continue: publickey,password,keyboard-interactive
debug1: next auth method to try is publickey
debug1: try privkey: /home/david/.ssh/id_rsa
debug1: try privkey: /home/david/.ssh/id_dsa
debug1: next auth method to try is password
[EMAIL PROTECTED]'s password: 

Then:

dhcp-140[2] echo "Protocol 1,2" >~/.ssh/config
dhcp-140[3] cat ~/.ssh/config
Protocol 1,2
dhcp-140[4] ssh -v pogo
OpenSSH_2.9 [EMAIL PROTECTED] 20010503, SSH protocols 1.5/2.0, OpenSSL 0x00906010
debug1: Reading configuration data /home/david/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
...
debug1: Connection established.
debug1: identity file /home/david/.ssh/identity type 0
debug1: identity file /home/david/.ssh/id_rsa type -1
debug1: identity file /home/david/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_2.5.1p2
debug1: match: OpenSSH_2.5.1p2 pat ^OpenSSH_2\.5\.[012]
debug1: Local version string SSH-1.5-OpenSSH_2.9 [EMAIL PROTECTED] 20010503
debug1: Waiting for server public key.
de

Re: ssh public key auth. incompatible between 2.3.0 vs. 2.9?

2001-05-13 Thread David Wolfskill

[Replies to both responders to date:  2 replies for the cost of a single
message.  :-}  dhw]

>Date: Sat, 12 May 2001 23:40:52 -0700
>From: Alfred Perlstein <[EMAIL PROTECTED]>

>> So basically, I'm confused.  ssh appears to work ok for password
>> authentication, but not for public key authentication -- or at least, it
>> doesn't appear to be (completely?) compatible with ssh 2.3.0.  Or maybe
>> I'm overlooking something...?

>Brian Feldman switched the default to ssh2, for some reason it doesn't
>back off and try version 1.  you need to do this "ssh -1 " which
>is damn irritating, but I don't know of any other option.

The "-1" flag does not appear to be valid for ssh 2.9; attempting its
use generates a usage message.

>Would it be possible to try version 1 before password?

I'll give that a try later today.  (I'm building today's -STABLE at the
moment; I s'pose I could chroot to the -CURRENT root & try it out that
way, but trying to explain the situation if it doesn't work sounds even
messier than what I've done so far)



>Date: Sun, 13 May 2001 09:44:41 +0200
>From: Szilveszter Adam <[EMAIL PROTECTED]>

>I am working on reproducing this, so I would like to ask for
>clarification... Unless I am mistaken, you have 3.2-RELEASE on the machine
>that you are connecting to with ssh2 port installed. Right?

In this particular case, yes.  And I had installed the ssh-2.0.12 port
on it (soome time back).  But I have observed similar behavior when the
ssh server is any of several different machines -- running FreeBSD
4.2-STABLE or (SPARC) Solaris 2.6 or 8, for example.

>And you are trying to use RSA Auth using ssh1 on purpose although both 
>sides could use ssh2 in theory.

Not particularly.

I'm trying to use public key authentication, vs. password authentication.

Whether it's "RSA" or "DSA" isn't something I care about (except to get
it working); mostly, I want the same functionality, and I'd prefer to at
least know what steps I need to take, so that if & when OpenSSH 2.9 is
MFCed, folks who are similarly-situated will be able to get a "heads up"
on changes they may need to make to preserve equivalent function.

>And you are seeing that -CURRENT's ssh does not fall back to RSA
>key auth when it cannot use DSA. But you have already used ssh2 to this
>host before. (Because it is contained in the known_hosts2 file). 
>Maybe this confuses ssh.

Well, I've certainly used ssh 2.3.0 (under FreeBSD 4.3-STABLE, for
example) to get to it.

>In my setup, I have only one server that can do SSH2 (mine, the -CURRENT
>box) all others are unable, because they use either older versions of
>OpenSSH or the ssh1 from SSH Communications. But I have absolutely no
>problem in connecting between them with RSA keys... although I have just
>tried (almost) all combinations.:-) Even the -CURRENT server does well,
>although ssh2 is the first option tried in the server config because some
>windoze clients can do ssh2 already so why not use it? But admittedly I
>have not tried RSA auth between two ssh2 capable hosts... will need the
>help of a collegaue with it. (who will kindly reboot the machine on the
>other end into FreeBSD-STABLE:-) Note that I do not have a known_hosts2 or
>an authorized_keys2 file anywhere. 

Hmmm I just checked:  I don't (happen to) have the laptop set up so
that I can use public key authentication to use ssh to itself.  (I
checked this under -STABLE; OpenSSH 2.3.0.)  After I boot -CURRRENT, I
may play around with this a bit

Thanks,
david
-- 
David H. Wolfskill  [EMAIL PROTECTED]
As a computing professional, I believe it would be unethical for me to
advise, recommend, or support the use (save possibly for personal
amusement) of any product that is or depends on any Microsoft product.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: ssh public key auth. incompatible between 2.3.0 vs. 2.9?

2001-05-13 Thread Szilveszter Adam

Hello David,

On Sat, May 12, 2001 at 10:40:35PM -0700, David Wolfskill wrote:
> OK; there's something about the (relatively) new ssh (2.9) in -CURRENT
> I'm not understanding.  I have hunted around for some clues (via man pages
> & the like), but it could well be that I'm still failing to notice
> something -- quite possibly something that should be obvious to even me
> -- and I welcome a clue.

I am working on reproducing this, so I would like to ask for
clarification... Unless I am mistaken, you have 3.2-RELEASE on the machine
that you are connecting to with ssh2 port installed. Right?

And you are trying to use RSA Auth using ssh1 on purpose although both 
sides could use ssh2
in theory. And you are seeing that -CURRENT's ssh does not fall back to RSA
key auth when it cannot use DSA. But you have already used ssh2 to this
host before. (Because it is contained in the known_hosts2 file). 
Maybe this confuses ssh.

In my setup, I have only one server that can do SSH2 (mine, the -CURRENT
box) all others are unable, because they use either older versions of
OpenSSH or the ssh1 from SSH Communications. But I have absolutely no
problem in connecting between them with RSA keys... although I have just
tried (almost) all combinations.:-) Even the -CURRENT server does well,
although ssh2 is the first option tried in the server config because some
windoze clients can do ssh2 already so why not use it? But admittedly I
have not tried RSA auth between two ssh2 capable hosts... will need the
help of a collegaue with it. (who will kindly reboot the machine on the
other end into FreeBSD-STABLE:-) Note that I do not have a known_hosts2 or
an authorized_keys2 file anywhere. 

-- 
Regards:

Szilveszter ADAM
Szeged University
Szeged Hungary

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message