Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Feb 2006 07:53:59 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        david bryce <davidbryce@fastmail.fm>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: SSH with Public Key Authentication (Was: Re: Attention: Giorgos Keramidas (Was: CVS Import Permissions))
Message-ID:  <43E1BA97.1040500@infracaninophile.co.uk>
In-Reply-To: <1138850846.21966.253343832@webmail.messagingengine.com>
References:  <1138676399.30955.253148220@webmail.messagingengine.com>	<20060131094135.GA2042@flame.pc>	<1138836616.370.253326484@webmail.messagingengine.com>	<20060201234837.GA57878@flame.pc>	<1138840074.5777.253333547@webmail.messagingengine.com>	<20060202003829.GA44801@flame.pc> <1138850846.21966.253343832@webmail.messagingengine.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig442D62F3B029AE4FDCE5BA6B
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

david bryce wrote:
> On Thu, 2 Feb 2006 02:38:29 +0200, "Giorgos Keramidas"
> <keramida@ceid.upatras.gr> said:
>> On 2006-02-02 11:27, david bryce <davidbryce@fastmail.fm> wrote:
>>> On Thu, 2 Feb 2006 01:48:37 +0200, "Giorgos Keramidas"
>>>>> I have tried using SSH in the past, and got stuck setting up the
>>>>> public key login (that's why we're using pserver).
>>>>>
>>>>> I spent a few hours yesterday trying to get SSH going again. I can
>>>>> login with SSH from the windows machine using Putty, but only when
>>>>> I use password authentication. In order to use cvs with ssh (using
>>>>> the plink program in Putty), we must use public key authentication.=

>>>> Unfortunately, I can't help with the Windows side.  I'm only using U=
NIX
>>>> machines as clients, so Putty is something new to me :-(
>>>>
>>>> Perhaps someone else on freebsd-questions can help with Putty?
>>> What about on the freebsd server side? Are there any logfiles I can
>>> look at on the server? Thanks!
>> /var/log/auth.log and /var/log/messages are the ones I'd look at.  But=
 I
>> didn't notice anything interesting in the auth.log snippet you posted.=

>>
>=20
> Thanks, Giorgos! /var/log/messages didn't have anything in it either.
> You'd think there'd be a way to force sshd to write to the log why
> it rejected a private key. Thank you!

You do know that putty generates keys using the preferred SSH2-compatible=

format of SSH Corp (http://www.ssh.com/) whereas the FreeBSD box you're
trying to log into uses the slightly different format from the OpenSSH
project (http://www.openssh.org/)?

If you generate your keys within putty, then copy the public key onto
your FreeBSD box you can convert the format like so:

    # ssh-keygen -i -f putty.pubkey > openssh.pubkey

If you examine the two files, you'll see that the differences are that
the OpenSSH one doesn't have the 'BEGIN' and 'END' lines, and all of
the data is on one single long line.

There's also a '-e' option for exporting OpenSSH keys to the SSH2-compati=
ble
format.

Oh, and to get more logging info out of sshd, run it with 3 '-d' flags on=

a separate port number:

    sshd -d -d -d -p 2222

That will cause ssh not to daemonize, so it will quit when you end your s=
sh
session.  You don't want to run sshd with max debug turned on all the tim=
e,
as it will potentially leak sensitive information.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
                                                      Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW


--------------enig442D62F3B029AE4FDCE5BA6B
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFD4bqd8Mjk52CukIwRA8nVAJ9F8FADgttgd3HV7IarzcMxsagCUQCggwO3
7HXefcQA3UXyUl+2W44+D1M=
=DJyE
-----END PGP SIGNATURE-----

--------------enig442D62F3B029AE4FDCE5BA6B--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43E1BA97.1040500>