Switches, Hubs, and Modems
Showing results for 
Search instead for 
Did you mean: 

PCM+: Cannot install the Pub Key File on Switches

Alen Ahja
Frequent Advisor

PCM+: Cannot install the Pub Key File on Switches

Hi everybody,

I cannot install the Pub Key File which I created in the PCM (Preferences - Device Access - SSH Key).

I copy the SSH2 Public Key into a textfile and tried to upload it to the switches via TFTP:
copy tftp pub-key-file IP-ADDR ssh2-pub-key-pcm.txt

I modified my text file as shown:
M0ml6w== procurve

I get the error message: "Download failed: overlength key in key file."

How must I import the Pub-Key from the PCM into the switches? Can the PCM it?

I use PCM 2.0+

Thanx for help.

Alen Ahja
Valued Contributor

Re: PCM+: Cannot install the Pub Key File on Switches

Configure an OpenSSH Server to Recognize Your Identity .pub File

In order to use your public key you must transfer the identity .pub file created by the Key Generation Wizard to the ~/.ssh folder on the SSH2 server. It is recommended that you follow the procedure below to create a copy of the identity .pub file in the ~/.ssh folder on the remote machine.

The procedure outlined here assumes that you have the same account on both the SSH2 server and the FTP server and that they share files. If this is not the case, contact your system administrator for instruction on setting up your public-key files on your SSH2 server.

To configure the OpenSSH server to recognize your identity .pub file:

1. Connect to the remote server using SSH2 and password authentication.
2. On the server, create a ~/.ssh folder if necessary.
3. Using drag-and-drop, transfer the identity .pub file to the ~/.ssh folder. Be sure to transfer the file in ASCII mode.
4. Use a terminal emulator to convert the key to one that OpenSSH will recognize using one of the following commands (be sure to replace with the name of your identity file):

% ssh-keygen -X -f ~/.ssh/.pub >> authorized_keys2 (for OpenSSH 2.5 and earlier)

% ssh-keygen -i -f ~/.ssh/.pub >> authorized_keys2 (for OpenSSH 2.9 and later)

5. Ensure that you are the only user with permissions to write to your identity .pub file.

The method described above uses only a single public key in the authorization file. It is possible to have more than one public key in the authorization file. To do this, repeat steps 3 and 4. The names of the public-key files must be unique.

Note: OpenSSH 3.0 uses the Authorized_keys file instead of Authorized_keys2 file. Currently, the Authorized_keys2 file will still be recognized but this may change in future releases.
If U need a helping hand, U will find one at the end of your arm
Alen Ahja
Frequent Advisor

Re: PCM+: Cannot install the Pub Key File on Switches


It was easier as I thought.
The Pub-Key-File will be created in the directory Installdirectory of the PCM under "server\config". It's name ist procurveSSH2.pub (for SSHv2) and procurveSSH1.pub (for SSHv1).
This file can be copy via TFTP to the switch with the command:

copy tftp pub-key-fiel procurveSSH2.pub

This works fine.

Thanx for help.


Alen Ahja