Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-20-2008, 08:58 PM
hayden hayden is offline
Registered User
 
Join Date: Jun 2008
Posts: 62
could .ppk transfer to .pub

as our know, putty's private key's format is .ppk file, but Scrt can't pass by .ppk, so if is there a way translate .ppk to .pub ??
Reply With Quote
  #2  
Old 09-22-2008, 08:38 AM
tnygren's Avatar
tnygren tnygren is offline
Registered User
 
Join Date: May 2005
Posts: 1,408
Hi Hayden,

It is possible to convert the keys generate by Putty to an OpenSSH format. SecureCRT can use the private keys that are in the OpenSSH format.

To convert your putty-generated .ppk file into an OpenSSH private key that can be used with VanDyke Software products, follow these steps:

Quote:
1. Run "puttygen.exe". The "PuTTY Key Generator" dialog will appear.

2. Use the "Load" button to load the .ppk file that contains your private key. If your private key file is protected with a passphrase, you will be prompted to supply the passphrase in order to complete the loading of the private key.

3. Once the private key has been loaded properly, choose "Export OpenSSH key" from the main "Conversions" pull-down menu that is part of the "PuTTY Key Generator" window.

4. When the "Save private key as:" window appears, specify a filename for the private key file such as "Identity" and choose "Save".

NOTE: The private key file name should not have any extension associated with it. For example, if SecureCRT is configured to use a public key named "Identity.pub", it expects to find the private key in the same folder as the public key file, with the name of "Identity".

Similarly, if SecureCRT is confgured to use a private key named "Identity", it expects to find a the public key in a file named "Identity.pub" located in the same folder as the private key file.

Now you will need to export the public key to a file format that follows the IETF SecSH internet-draft.

5. Choose "Save public key". When the "Save public key as:" window appears, specify a filename for the public key file, such as "Identity.pub", and choose "Save".
Note: It is important for use with VanDyke Software products that the public and private key files both share the same basename. For example, if you named your private key file "Identity" as suggested in step 4 above, the public key file should be saved as "Identity.pub".

Once you have completed the steps outlined above, you will be able to use your Identity and Identity.pub files with VanDyke Software products.
__________________
Thanks,

Teresa

Teresa Nygren
Reply With Quote
  #3  
Old 09-24-2008, 03:04 PM
hayden hayden is offline
Registered User
 
Join Date: Jun 2008
Posts: 62
Thank your great help,tnygren!
it works, and could we write above to script so that we could auto login remote host ? How to write the script?
Reply With Quote
  #4  
Old 09-25-2008, 08:53 AM
tnygren's Avatar
tnygren tnygren is offline
Registered User
 
Join Date: May 2005
Posts: 1,408
Hi Hayden,

I'm glad to hear that this helps.

Were you needing to script this process or to automate the log on with SecureCRT?

If it was to script this process, Putty is not a VanDyke product so I am not familiar with its scripting options (if it has scripting capabilities) and am not certain if this can be scripted.

You may be able to find more information on forums specific to Putty itself.

If you need to automate the log on in SecureCRT, could you tell me more about what is needed?
__________________
Thanks,

Teresa

Teresa Nygren

Last edited by tnygren; 09-25-2008 at 09:33 AM.
Reply With Quote
  #5  
Old 09-26-2008, 01:12 AM
hayden hayden is offline
Registered User
 
Join Date: Jun 2008
Posts: 62
Oops.. i mean if Scrt has a function ,so that i could auto login the host which need pass private key by command line looks like:
Scrt.exe /ssh2 /i xxx.pub Host
Reply With Quote
  #6  
Old 09-26-2008, 08:16 AM
tnygren's Avatar
tnygren tnygren is offline
Registered User
 
Join Date: May 2005
Posts: 1,408
Hi Hayden,

I'm not certain that I completely understand what is needed.

Were you needing to include the passphrase for the key so that the connection would occur without user input?

If so, this can be accomplished with the following command line:

SecureCRT.exe /SSH2 /I <path and filename for key file> /Passphrase <passphrase> hostname

If this is not what is needed for the auto log on, could you tell me more about what is needed?
__________________
Thanks,

Teresa

Teresa Nygren
Reply With Quote
  #7  
Old 09-27-2008, 08:29 AM
hayden hayden is offline
Registered User
 
Join Date: Jun 2008
Posts: 62
Just what i need. thank you,tnygren.
and if
SecureCRT.exe /SSH2 /I <path and filename for keyfile> /ACCEPTHOSTKEYS host
works?cuz keyfile will cause prompt as forum post 3122.
Reply With Quote
  #8  
Old 09-29-2008, 10:44 AM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,040
Hi hayden,

I'm not sure if you know but I posted a response to your question in forum thread 3122. If you would like to continue discussing the issue it's probably best to do so in that forum thread.
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]
Reply With Quote
  #9  
Old 10-12-2008, 10:26 PM
hayden hayden is offline
Registered User
 
Join Date: Jun 2008
Posts: 62
finally, it works, thank you all~
Reply With Quote
Reply


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

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 07:29 AM.