02-07-2012 11:41 AM
I'm developing a tool in Labview and this tool needs to generate SSH key then copy them out. I don't see a function in Labview that can generate SSH key pairs. I've tried external programs puttygen.exe and ssh-keygen. None of them are ideal solutions. Because puttygen needs mouse and button press interactions (user interface) and ssh-keygen needs cygwin installation.
Does anyone have any better ideas?
Thanks very much!
02-07-2012 12:03 PM
Believe OpenSSL can do that, all terminal-based... can use the system_exec.vi to call openssl.
02-07-2012 01:45 PM
Thank you for your response!
I just tried genrsa in openSSL and it seems that genrsa only generates a private key. How do I use openSSL to generte a SSH key pair including a private key and a public key? What will be the command line look like if I want to specify it to run quietly (i.e. no screen printing), specify the key size (to 1024), specify the file name and specify the password? I'm not familiar with this tool, if you can give me a little more detailed help, I'd really appreciate it.
Thanks a lot!
02-07-2012 02:12 PM
@Labveiw User wrote:
Thank you for your response!
I just tried genrsa in openSSL and it seems that genrsa only generates a private key. How do I use openSSL to generte a SSH key pair including a private key and a public key? What will be the command line look like if I want to specify it to run quietly (i.e. no screen printing), specify the key size (to 1024), specify the file name and specify the password? I'm not familiar with this tool, if you can give me a little more detailed help, I'd really appreciate it.
Thanks a lot!
Generally the place that you download this software will offer this type of help.
02-07-2012 02:19 PM
That's probably the best place to start.
02-10-2012 02:54 PM
Thanks very much for your help! I followed the link and was able to find all the related documents. I read them and followed the instructions and syntax. However it seemed that the keys generated didn't work. Due to time constrain, I've decided to stick with ssh-keygen. Again, I appreciate all your responses and help!
Regards.
03-22-2012 11:44 AM
I have another question:
I used ssh-keygen with System Exec.vi. The code works fine on my XP machine. But it doesn't work on windows 7 enterprise machine. It seems that windows 7 has different security settings. But I tried to use different location for the working directory for System Exec.vi and it still wouldn't work.
I've attached a snapshot of my code here. I even tried to just have ssh-keygen in the command line and it didn't work either.
Does anyone have any ideas?
Thanks very much!
03-22-2012 12:08 PM - edited 03-22-2012 12:09 PM
03-23-2012 05:00 AM
The double quote at the end of the command string looks suspect to me!
03-23-2012 08:53 AM
Rolf,
That was not a double quote. They were two Apostrophe marks. Yeah, I know it looks like a double quote.
Like I said, the code works fine on XP machine. On Windows 7 machine, the command I had there works in Cygwin window if you manually type in. It's just that it doesn't work with System Exec. vi in Labview. Any idea? Can anybody help please?
Thanks very much!