ssh _and_ scp using same details

ssh _and_ scp using same details

avatar

Hi
I've been trying to replicate the feature I was using in Penguinet to open an scp/sftp session based on the same settings as the ssh session.
For example host alice.example.com:8899 uses private key.
I have run into the following issues:-
1) although both SFTP and SSH can be configured separately in the enterprise edition, there isn't a way to automatically switch between.
2) If I try to create a template, the template won't automatically set up:
a) the port - SFTP will not accept a non-numeric port so $PORT$ is not permitted
b) the private key - there is no template variable for this?
So it seems I have to do this manually every time, unless it's on the standard port or without private key.
I am very new to this software, so is there another way to do it? I would like to migrate about 100 hosts in so it could take some time...
Thanks

All Comments (4)

avatar

Hi,
I don't think it's possible with the third party we use. However perhaps we could create an add-on to integrate Penguinet. Do you know if they support a command line?

David Hervieux

avatar

Couldn't there be some way to either

a) fix the built-in sftp to accept $[PARENT_]PORT$ and add $[PARENT_]PRIVATE_KEY$

OR

b) add a feature to the built-in SSH to click and create SFTP connection using same settings (including port and private key)

As regards Penguinet, They take command line options and export to XML. Although it looks like I can't convert the XML more than to just import NAME,HOST and fix everything manually after that

Here are the command line options, but they don't take a private key.

Command line options:
PenguiNet can be launched from a command line using a series of parameters. The easiest way to use this is to create a profile, and then drag it from the profiles window into an explorer window. This will create a shortcut to the appropriate profile using a unique ID.

The full syntax of the command line options is as follows:

[protocol://][username[:password]@]host[:por>][?option[[?|&]option[...]]]

Where:

protocol = ["telnet"|"ssh"|"scp"]. If none is supplied, "ssh" is used.
username = The username. If none supplied, none used.
password = The password. If none supplied, none used.
host = The only compulsory part.
port = Port number. If none supplied, the default for the protocol is used.
option = ["utf8"|"noutf8"|"linux"|"vt100"|"xterm"|"disablesocks"|"nodisablesocks"]


As many options as needed may be specified. If conflicting options are specified (ie, both utf8 and noutf8, or both socks options), the last on the command line will be used. If you leave out any class of option, the defaults are taken from the Default profile. If you use all of the options of command-line, you can specify every option you can specify in the quick-connect window.

Some examples:

ssh://joe-user:PassW0rd@my.remote.host.com:22?utf8?linux?nosocks
ssh://joe-user:PassW0rd@my.remote.host.com:22?utf8&linux&nosocks

Both these examples connect using ssh, port 22, username joe-user, password PassW0rd, utf8 on, terminal linux and not using socks server.

my.remote.host.com

Connects using ssh, port 22, no username/pass, default utf8/term/socks from Default profile.

telnet://joe-user@my.remote.host.com?linux

Connects using telnet, port 23, username jpe-user, no pass, termtype linux, default utf8/socks from Default profile.

profile://profilename

This doesn't take any of the above parameters - you can specify them, but they'll be ignored. You can also use scpprofile:// - which is the same thing, but overrides the protocol to make it SCP (like pressing the SCP button).

As previously mentioned, you can also use:

profnum://profile_id_number

This is the form generated by dragging profiles out of the profiles window to explorer. It also doesn't take any parameters. As above, there's scpprofnum:// for SCP-button-pressing equivalent.

avatar

Hi,
I have entered a feature request for the add-on. For the original issue, I'm not sure how easy it would be add the parent port and private key. I have to think about it.

For the private key, you can create a credential entry and reuse it for the two sessions. But for the port, I don't have any idea how I could fit this in the UI

David Hervieux

avatar

Hi, I've just tried again to trial using RDM, but this appears to still be an issue, I've tried to enter $PARENT_PORT$ in sub connection SFTP but it won't accept the variable, just to check is this feature still not really possible? Thanks