Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Reply
 
Thread Tools Display Modes
  #1  
Old 03-28-2012, 08:54 AM
imasterxx imasterxx is offline
Registered User
 
Join Date: Mar 2012
Posts: 3
Question Need help with 'Could not load the public key file (file)' Error

Hello.

I'm getting an error while trying to connect that says "Could not load the public key file (file). The system cannot find the file specified." This is via SecureCRT

I'm hoping someone here can help me?

OS = Windows XP Service Pack 3
SecureCRT version 5.0.2 Build 1033

I know the key file exists. I've even tried renaming it and using a different name. I tried putting it into the C:\ drive and made sure there are no special characters or anything like that. I've also been able to use the exact same key on another PC and it works perfectly. So I have no idea why the key would work on another PC and not this one. Needless to say I'm very confused. Does anyone know why this is happening? (Maybe a setting somewhere that I've forgotten?)

Thanks!
Reply With Quote
  #2  
Old 03-28-2012, 09:45 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,483
Hello imasterxx,

Please note that SecureCRT 5.0.2 is a fairly old version (6 years old). You might want to check your upgrade eligibility here.

Is both the public-key and private key file found on the machine (your PC)?

Is SecureCRT configured to point to the public-key file or the private key file?

Do you know the background of how the public/private key pair was created?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 03-28-2012, 10:11 AM
imasterxx imasterxx is offline
Registered User
 
Join Date: Mar 2012
Posts: 3
Re: Need help with 'Could not load the public key file (file)' Error

The key was originally generated on a Unix server. My understanding is there are 2 parts: The part of the key that goes into the authorized_keys2 file (within the .ssh folder under the home directory of the user on the target server), and the other half is used to remotely connect (without specifying a password).

The 2 parts were generated on a Unix server. I've tested the key out on other Unix servers and it works just fine. I've also used it on my (older) PC with Secure CRT with no issues.

You said the public key and private key need to be found on my workstation? This is news to me because Secure CRT only asks for a single identity file. I can't find where it asks for both parts to the generated key file.
Reply With Quote
  #4  
Old 03-28-2012, 10:47 AM
imasterxx imasterxx is offline
Registered User
 
Join Date: Mar 2012
Posts: 3
Solved!

Ok, I got it. Looks like I need do need both of the pieces of the key file; and they have to be located in the same folder. Secure CRT will look for the .pub file automatically. And the name of the .pub file has to match the other half of the key. Once this is in place then the Fingerprint is displayed in Secure CRT. Once I saw that then I knew it was going to work.
Reply With Quote
  #5  
Old 03-28-2012, 10:56 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,483
Hello imasterxx,

Quote:
The part of the key that goes into the authorized_keys2 file (within the .ssh folder under the home directory of the user on the target server),
To clarify: this part is the public key file.

Quote:
and the other half is used to remotely connect (without specifying a password).
And this half is the private key file.

As of SecureCRT 6.5, only the private key is required.

Changes in SecureCRT 6.5 (Beta 2) -- October 15, 2009
-----------------------------------------------------

Changes:
  • SSH2: When an RSA key is used for authentication, only the private key is required, which makes it easier to use Amazon EC2 keys.

Although the SecureCRT history file listed RSA specifically, I have tested with keys generated using the DSA algorithm and the same applies.

For prior versions of SecureCRT, it is necessary to have both the public and private key files on the local computer in the same location with the same basename (ie: identity and identity.pub).

You can verify this by checking on that older PC for the presence of both key files.

True, the private key file is the client's portion of the pair, but SecureCRT 5.0.2 requires the public-key file for authentication to succeed.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #6  
Old 03-28-2012, 10:57 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,483
Hi imasterxx,

I am typing too slowly this morning.

I am glad to hear you resolved the issue.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 08:54 AM.