Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 08-07-2014, 03:15 AM
Andomar Andomar is offline
Registered User
 
Join Date: Mar 2014
Posts: 16
Lightbulb MacOS location of key

On Windows, my private key is stored in C:\MyStuff\Keys\MyKey. I have the same directory structure on my Mac. But of course, on Mac the MyStuff directory is not stored in C:\.

Is there a way configure relative paths for certificates in SecureCRT sessions?

Or what's a good way to share session definitions between MacOS and Windows?
Reply With Quote
  #2  
Old 08-07-2014, 07:03 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi Andormar,

What version of SecureCRT are you using?

Do you have the ability to store the private key in a different location?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 08-07-2014, 10:43 AM
Andomar Andomar is offline
Registered User
 
Join Date: Mar 2014
Posts: 16
Hi Todd,

Thanks for your reply. I'm using the latest version (maintenance valid till 2017)

I can move the keys, but then I'd have to make the same move on the PC. It seems that PC absolute paths (c:\..\) can't work on MAC, and MAC absolute paths (/Users/Me/...) can't work on PC.

I thought about environment variables, but even that syntax is different. On PC it'd be %MyKeyDir\key1 and on MAC it would some something like $MyKeyDir/key1.
Reply With Quote
  #4  
Old 08-07-2014, 11:21 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi Andormar,

You are correct, but SecureCRT 7.2.5 has the ability to use platform agnostic paths for a few locations.

If you can place your keys in the configuration folder, SecureCRT will automatically change the path to work on both Mac and Windows.

For example, if your private key file was located in the following paths, the sessions should be able to find it on either platform:
Windows:
C:\Users\<user>\Appdata\Roaming\Config\identity
Mac:
/Users/<user>/Library/Application Support/VanDyke/SecureCRT/Config/identity
The changes you must make for this to work would be the location of the private key file, and point the sessions to the new private key file location.

Would you give this a try and let me know if it meets your needs?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730

Last edited by rtb; 08-07-2014 at 11:24 AM.
Reply With Quote
  #5  
Old 08-07-2014, 01:12 PM
Andomar Andomar is offline
Registered User
 
Join Date: Mar 2014
Posts: 16
Thanks for your answer. It does not seem to work for me. I've set my config path to something like:

/users/me/MyStuff/SecureCRT6 Config

I created a subdirectory "identity" and placed a private key in that folder. Then in the session configuration, I put just the name of the private key file.

When I try to connect, SecureCRT says:

Could not load the public key from the private key file: key file No such file or directory
Reply With Quote
  #6  
Old 08-07-2014, 01:27 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi Andomar,

Thanks for the update. I would like to have you send a session .ini file that uses the new location for the configuration folder and the new private key location.

Would you send an email to support@vandyke.com with a subject of Attn: Todd - Forum thread #11625?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #7  
Old 08-09-2014, 09:59 AM
Andomar Andomar is offline
Registered User
 
Join Date: Mar 2014
Posts: 16
Thanks for your email reply. I'll continue the conversation here so it may benefit other people.

I did enter the certificate with the GUI, just not with the "..." button. I typed in "keyfile_rsa" assuming %ConfDir%\identity would be a default location.

When I entered the filename using the "..." button as you suggested it worked at once on both PC and MAC. The entry in mysession.ini now looks like:

Code:
S:"Identity Filename V2"=${VDS_CONFIG_PATH}\identity\keyfile_rsa
In the meantime, it appears SecureCRT will also use Mac's stored certificates, even if you do not specify that certificate in the options. You can store a certificate on MacOS with:

Code:
ssh-add -k keyfile_rsa
Using this method you do not have to enter your passphrase again, even after a reboot. List current certificates with:

Code:
ssh-add -L
Or delete them all:

Code:
ssh-add -D
One final thought: SecureCRT also reuses my default download location. But "c:\my downloads" does not make sense on a MAC. I'm not sure how much sense it makes to have SecureCRT share those paths between Windows and MAC.

Last edited by Andomar; 08-09-2014 at 10:01 AM.
Reply With Quote
  #8  
Old 08-09-2014, 05:15 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi Andomar,

Thanks for saving me some time by posting your wrap-up of our conversation and your testing.

With regards to your comment about the download directory, would you tell me more about what change you would like to see made to SecureCRT?

As a note and for others reading, SecureCRT will handle the path modification automatically if the configuration is done through the GUI.

Along with the configuration folder, SecureCRT will also automatically handle locations that point to My Documents on Windows, and the user's Documents folder and .ssh folder on Mac.

If you place your downloads in the above paths, would this work for you on both platforms?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730

Last edited by rtb; 08-09-2014 at 05:17 PM.
Reply With Quote
  #9  
Old 08-10-2014, 06:34 AM
Andomar Andomar is offline
Registered User
 
Join Date: Mar 2014
Posts: 16
Hi Todd,

Since I use "c:\MyStuff", having separate MAC/PC Download directories would work best for me.

Your current setup is probably best for most people. Perhaps you could map the entire user directory (c:\users\myaccount) instead of just the My Documents folder.

If you publish an Android client you'll have a third path system to support I guess!

Cheers,
Andomar
Reply With Quote
  #10  
Old 08-11-2014, 10:17 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi Andomar,

Thanks for the feedback. I have created a couple more feature requests. If we add the ability to handle download paths (using different options per platform or some sort of cross-platform capability) we will post here.

Also, if we add the ability to use the entire user directory, we will post here.

If you would like to be notified directly, please complete and submit the form at the following location:
Submit Feature Request
__________________
--Todd

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

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 07:58 PM.