Operating System - HP-UX
1753769 Members
5342 Online
54796 Solutions
New Discussion

Re: server refused public key from puttygen

 
Matti_Kurkela
Honored Contributor

Re: server refused public key from puttygen

> When I used root to run "ssh-keygen -i -f key.pub >> authorized_keys", I get the error input too long".

Why did you use "ssh-keygen -i" in the first place? It is supposed to convert the key from a format used by ssh.com products to OpenSSH format. If you used the "Public key for pasting into OpenSSH authorized_keys file" option in PuTTYgen, no further conversion should be necessary at the HP-UX side.

Please try this:
1.) Just use PuTTY to login from the Windows server to HP-UX using the password. Open the /home/user/.ssh/authorized_keys file in a text editor, and make sure it's ready to receive text.

2.) On the Windows server, start PuTTYgen and load your .ppk file.

3.) Select the entire text in "Public key for pasting into OpenSSH authorized_keys file", copy it and right-click on the PuTTY session to paste the key text into the Unix text editor running in the PuTTY session.
If your editor of choice has any word-wrap features, make sure the key is pasted as one long line.

Or are you using a ssh.com server package in your HP-UX system? That package includes its own ssh-keygen, which imports into its own native format. But PuTTYgen can produce that format directly too: there is no need to first create an OpenSSH public key file and then convert it to ssh.com format.

To quickly identify the SSH version on the HP-UX system, use telnet to connect to port 22 of the HP-UX system. You'll see one line of text, listing the name and version of the SSH server. Because the telnet client cannot send the proper SSH response, the telnet session will eventually time out... but by then, you already have the server SSH version information.

MK
MK