SSH Port Forward entry not referencing Key stored in repository

SSH Port Forward entry not referencing Key stored in repository

avatar

Perhaps i'm making a mistake here, however other ssh entries work without issue using the key stored in the repository.

When I create an SSH Port Forward session and select the Private Key tab, the Private key type of Repository, and then the key, RDM attempts to find a key file that stored locally on my workstation instead of the repository.

I've created other sessions (ssh, rebex) using the same method and they work without issue.

Is this a known bug?

My overall goal is to create tunnels for remote console access (idrac specifically), however I have to first jump to an ssh host that's remote, then tunnel to the idrac interface. I'd like to accomplish that with a single entry.


Currently using 11.0.18.0.

All Comments (14)

avatar

Hello,

We'll investigate this issue. I'll keep you updated.

Regards,

Hubert Mireault

avatar

Hello,

From what I understand, your private key entry uses the "data" type, am I correct? Using this, you pasted the key's value and saved it to the entry.
Unfortunately, due to the way our SSH integration works, we can't directly send the private key string to the terminal. We have to create a temporary file, then use it to connect, then delete the file.
This is probably what you're seeing in the portforward logs. Is the path of the file in the log your temporary file folder? If that's the case, then it is definitely that.

We'll check and see if we can modify the terminal to accept the direct sending of the string so we don't have to create a temporary file on disk.

Regards,

Hubert Mireault

avatar

That is interesting, it seems to be referencing a path that doesn't exist on my system.
The "I:" drive its looking for doesn't exist.

Here is the output if it will help.
========================================

[1/19/2016 1:50:14 PM] Looking up host "<removed>"
[1/19/2016 1:50:14 PM] Connecting to <removed> port 22
[1/19/2016 1:50:14 PM] We claim version: SSH-2.0-PuTTY_Release_0.64
[1/19/2016 1:50:14 PM] Server version: SSH-2.0-OpenSSH_4.3
[1/19/2016 1:50:14 PM] We believe remote version has SSH-2 channel request bug
[1/19/2016 1:50:14 PM] Using SSH protocol version 2
[1/19/2016 1:50:14 PM] Doing Diffie-Hellman group exchange
[1/19/2016 1:50:14 PM] Doing Diffie-Hellman key exchange with hash SHA-1
[1/19/2016 1:50:14 PM] Host key fingerprint is:
[1/19/2016 1:50:14 PM] ssh-rsa 2048 <removed>
[1/19/2016 1:50:14 PM] Initialised AES-256 SDCTR client->server encryption
[1/19/2016 1:50:14 PM] Initialised HMAC-SHA1 client->server MAC algorithm
[1/19/2016 1:50:14 PM] Initialised AES-256 SDCTR server->client encryption
[1/19/2016 1:50:14 PM] Initialised HMAC-SHA1 server->client MAC algorithm
[1/19/2016 1:50:14 PM] Reading private key file "I:\RDM-Genereated-Private-key.pub.pri"
[1/19/2016 1:50:14 PM] Unable to use this key file (unable to open file)

========================================

avatar

The reason why it's probably not working with the PortForward entry but does with Rebex is due to the format of the file. For now, our terminal only supports .ppk private key files since it is based on PuTTY. We plan to support other formats, too. The current best way to use other formats of private keys would be to use the key agent http://blog.devolutions.net/2015/12/the-key-agent-manager.html .

The path and file name it uses for the file is odd, though. The file should be created in the temporary folder as well as add ".ppk" at the end of it, which makes it look something like the following:
[2016/01/19 14:04:03] Reading private key file "C:\Users\Hubert\AppData\Local\Temp\tmp3AF7.tmp.ppk"

Could you try making a new private key entry and using the "paste" button to paste the content of the private key file to the entry, then save it and use this entry to connect?

Regards,

Hubert Mireault

avatar

After pasting the contents it still failed. Looks like it timed out. Attached screen shot of error. Is there additional logging I can turn on, and or gather for you?

rdmerror.PNG

avatar

Can you confirm the content of the private key is of the PuTTY (.ppk) format?

Regards,

Hubert Mireault

avatar

Actually, it was generated using the tool embedded in RDM. I'll see if I can convert it to ppk.

avatar

When saving the private key using our key generator, you have the option to save it as .ppk format, maybe you can try this out.

This isn't too user-friendly yet, feedback like this is appreciated so we can improve the functionalities.

Regards,

Hubert Mireault

avatar

Same results either way. Even created an entirely new key, and pasted the data into the specific entry itself (after adding public to server).

Let me ask this. Is there currently any way to port forward 'on the fly' using the built in rebex shell?

For example, using PuTTY after an ssh session is established I can change settings and port forward at anytime during the session.

That functionality would actually eliminate my specific need for the separate port forward session. I can re-post, or move this question to the feature request section if need be.

Otherwise, let me know if you need anything else in regards to the keys.

avatar

Can you describe what you do with PuTTY to establish a portforward at any time? Do you mean that you use the "ssh -L" command? If so, you should be able to use it in both Rebex SSH Shell and SSH Shell connection types (and PuTTY too, of course). If you want to automate something with these, you could use the typing macros http://help.remotedesktopmanager.com/index.html?settings_events_autotypingmacro.htm

As for the issue with the key, we will investigate but we're unable to reproduce it in our environment. Are you using RDM 64 bits? If so, could you try 32 bits?

Regards,

Hubert Mireault

avatar

I've tried both 32 bit and 64bit.
========================================
In putty, once the session is established, I right click on the title bar go to 'change settings', then Connection --> SSH --> Tunnels. At that point I can create or remove any tunnel, or port forwarding on demand.

I've attached a screen shot.

I would prefer to utilize the built in client instead of putty outside of RDM.

rdm_putty_settings.png

avatar

Hello Seth,

Sorry for the delay. I'm not sure if we can easily support an "on the fly" changing of settings like that. As for the key issue, we will see what we can do.

Regards,

Hubert Mireault

avatar

Updated to V 11.1.0.0; issue with regards to key is no longer present.

avatar

Thanks for the feedback Seth.

Regards,

Hubert Mireault