Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Puttygen saved keys and FreeBSD ssh

0 views
Skip to first unread message

Ric

unread,
Dec 17, 2002, 6:15:07 AM12/17/02
to
I have several private keys in text files saved from PuTTYgen on Windows but
when I add these to authorized_keys2 in my .ssh directory in FreeBSD they
don't work. They work fine when I simply cut and paste from the box in
PuTTYgen but that is in a different format - in fact it says at the top of the
box "Public key for pasting into OpenSSH authorized_keys2 file".

The format change is obvious between the two but it seems I can't simply
rearange the key saved to a text file into the same format as that which I cut
and paste direct from PuTTYgen - it looks OK but doesn't work.

Does anyone know a way to convert a saved text file public key to the format
required for authorized_keys2 file? I realise this doesn't make too much sense
but if you've tried it yourself you'll know what I mean. I have people sending
me their saved public key files for inclusion on our mail server but I can't
actually use them unless there is a conversion method, and even if I ask them
to cut and paste rather than save I know the thickest among them will still
save to file, send me the file as they leave the office for a sales trip to
the US and then complain to upper management that they couldn't get their
important mail whilst away.

Cheers
Ric

Jeff Pettorino

unread,
Dec 17, 2002, 10:36:01 AM12/17/02
to
Ric, I know this sounds simplistic, but it happens to the best of us...are
you converting the files from MS-DOS to UX text files? I have no experience
on saving keys with PuTTY, but I know often when the web code monkeys around
here break something, a quick trip to VI reveals all sorts of nasty looking
^M characters...

Like I said, you have probably already checked this, but it wasn't mentioned
in your post.

"Ric" <r...@digital-animations.com> wrote in message
news:WDDL9.5467$Om2.8...@newsfep2-win.server.ntli.net...

Ric

unread,
Dec 17, 2002, 11:35:13 AM12/17/02
to
In article <10401393...@goodnews.cos.agilent.com>, "Jeff Pettorino" <first...@non.agilentDOTcom> wrote:
>Ric, I know this sounds simplistic, but it happens to the best of us...are
>you converting the files from MS-DOS to UX text files? I have no experience
>on saving keys with PuTTY, but I know often when the web code monkeys around
>here break something, a quick trip to VI reveals all sorts of nasty looking
>^M characters...
>
>Like I said, you have probably already checked this, but it wasn't mentioned
>in your post.

There is no such thing as a stupid suggestion in my book :), all help is
greatly appreciated. However... I use scite as my Windows text editor and it
deals with these problems, plus to copy into the authorized_keys2 file I have
to cut it down to one line, so this is not the problem. It is definately just
that cutting and pasting from PuTTYGEN gives it in one format (the correct
one, but you have to open the Private Key to get at the public one) whereas
saving it to a file puts it in a different format - the text file puts
comments in the file and moves the user comment above the key. Rearanging the
format to try and match them _looks_ right but still doesn't work.

As I said, it wouldn't really be a problem but some people simply create their
key and send me the public one as they are walking out the door, without any
discussion or consultation, and much as I would like to say tough shit when
they come back complaining that they couldn't get their mail I know it will
reflect badly on me rather than them. Such is the life of support.

Thanks anyway.
Cheers
Ric

0 new messages