bj407k Contributor.
Contributor.
2467 views

Reflection Secure Shell Client control password dialog box

How can I stop the dialog box titled "Reflection Secure Shell Client" from appearing when the host ask for a password and system ID when connecting to a session broker.

In Putty we get a command line prompt for password and "neID" to connect to a resource through a broker. The password dialog box is ok but I need to script answering the "neID" prompt in VBA. The "AfterConnect" event or connection does not trigger until that prompt is answered.

Regards,
Rodgers Jeffrey
Reflection for UNIX and OpenVMS 14.1
0 Likes
5 Replies
vfast Absent Member.
Absent Member.

Re: Reflection Secure Shell Client control password dialog b

You mention using VBA. Not sure what the "neID" prompt would be. If you want to avoid the SSH password prompt that occurs while connecting, set the SSHPasword property first before the Connect, and there will be no prompt.


Sub ssh_auto_connect()
Session.SSHPassword = "password"
Session.Connect
End Sub
0 Likes
Highlighted
bj407k Contributor.
Contributor.

Re: Reflection Secure Shell Client control password dialog b

Thank you for your reply. I will try that from VBA and see if it stops the dialog boxes.

I did not give myself enough time to explain yesterday. We are connecting to a management menu through a session broker called Nakina. Using Putty we get prompted for our username, if not provided in the SSH connection parameters, then password and then get prompted for the network equipment id (neID) to connect through the session broker. All of this happens in Putty like any command line sequence.

I connected using the command line Reflection SSH client capturing a debug. From command line it worked like in Putty (same prompts) and I could see the SSH protocol in debug.

It looks like Reflections, by default, provides those wonderful dialog boxes when the SSH protocol ask for the password and then another when the destination sends a "Authentication wait for message" and the prompt "neID:". The password dialog box is brilliant but the second prompt for neID is ugly since I want to "script" the response. The neID is the same string 99% of the time. I could not find a way to turn off the dialog boxes so it could all be controlled through code.

I will alter my code to prompt for password then set it before connecting to see if the "neID" prompt can be sent by code. I will post results here later.

Regards,
Rodgers Jeffrey
Reflection for UNIX and OpenVMS 14.1
0 Likes
bj407k Contributor.
Contributor.

Re: Reflection Secure Shell Client control password dialog b

Setting the session SSHPassword property in code stopped the dialog boxes. I ran the command line SSH in debug mode and ran TRACE in Reflections.

The command line SSH works and the debug information shows the request for the password and pass through system name (follows)

2017-12-19 9:04:06:030 debug1: Received authentication methods the server will allow: password,keyboard-interactive
2017-12-19 9:04:06:032 debug1: Next authentication method: keyboard-interactive
2017-12-19 9:04:06:034 debug1: Attempt to authenticate with keyboard interactive.

Password:
2017-12-19 9:04:11:855 debug1: Authentication wait for message.
2017-12-19 9:04:16:418 debug1: Authentication wait for message.

neId: {secure system name}

2017-12-19 9:04:24:655 debug1: Authentication wait for message.
2017-12-19 9:04:25:932 debug1: Authentication exit.
2017-12-19 9:04:25:934 debug1: Authentication succeeded (keyboard-interactive).
2017-12-19 9:04:25:936 debug1: Login completed

In Reflections the connection fails using VBA to set the SSH password. The banner appears in a dialog box but I do not get prompted for the pass through system name which Reflections treats like a second password.

2017-12-20 17:36:28:234 debug1: Next authentication method: keyboard-interactive
2017-12-20 17:36:28:236 debug1: Attempt to authenticate with keyboard interactive.
2017-12-20 17:36:28:238 debug2: we sent a keyboard-interactive packet, wait for reply
2017-12-20 17:36:28:294 debug2: input_userauth_info_req
2017-12-20 17:36:28:295 debug2: input_userauth_info_req: num_prompts 1
2017-12-20 17:36:28:296 debug3: packet_send2: adding 32 (len 26 padlen 6 extra_pad 64)
2017-12-20 17:36:28:298 debug1: Authentication wait for message.
2017-12-20 17:36:33:265 debug2: input_userauth_info_req
2017-12-20 17:36:33:266 debug2: input_userauth_info_req: num_prompts 0
2017-12-20 17:36:34:810 debug3: packet_send2: adding 48 (len 10 padlen 6 extra_pad 64)
2017-12-20 17:36:34:812 debug1: Authentication wait for message.
2017-12-20 17:36:35:080 debug2: input_userauth_info_req
2017-12-20 17:36:35:081 debug2: input_userauth_info_req: num_prompts 1
2017-12-20 17:36:35:083 debug3: packet_send2: adding 32 (len 26 padlen 6 extra_pad 64)
2017-12-20 17:36:35:084 debug1: Authentication wait for message.
2017-12-20 17:36:36:140 debug2: input_userauth_info_req
2017-12-20 17:36:36:142 debug2: input_userauth_info_req: num_prompts 1
2017-12-20 17:36:36:145 debug3: packet_send2: adding 32 (len 26 padlen 6 extra_pad 64)
2017-12-20 17:36:36:149 debug1: Authentication wait for message.
2017-12-20 17:36:36:862 debug2: input_userauth_info_req
2017-12-20 17:36:36:864 debug2: input_userauth_info_req: num_prompts 1
2017-12-20 17:36:36:865 debug3: packet_send2: adding 32 (len 26 padlen 6 extra_pad 64)
2017-12-20 17:36:36:868 debug1: Authentication wait for message.
2017-12-20 17:36:37:806 debug2: input_userauth_info_req
2017-12-20 17:36:37:807 debug2: input_userauth_info_req: num_prompts 1
2017-12-20 17:36:37:808 debug3: packet_send2: adding 32 (len 26 padlen 6 extra_pad 64)
2017-12-20 17:36:37:809 debug1: Authentication wait for message.
2017-12-20 17:36:39:131 debug2: input_userauth_info_req
2017-12-20 17:36:39:132 debug2: input_userauth_info_req: num_prompts 1
2017-12-20 17:36:39:133 debug3: packet_send2: adding 32 (len 26 padlen 6 extra_pad 64)
2017-12-20 17:36:39:134 debug1: Authentication wait for message.

Other than shot gunning all of the setting in the session I am lost and disappointed. I have been an advocate of Reflections since the 1990's. 😞

Regards,
Rodgers Jeffrey
Reflection for UNIX and OpenVMS 14.1
0 Likes
TomFitz Absent Member.
Absent Member.

Re: Reflection Secure Shell Client control password dialog b

Hi Jeffery,

there is a setting to allow one to authenticate in the terminal window (in blue below), this should take the SSH login dialog out of the equation and allow you to see and respond to your neID prompt.

here is some sample VBA code to demo how to set some of the SSH settings.
[INDENT]Sub SetupSSHOptions()[/INDENT]
[INDENT] ThisTerminal.ConnectionSettingsSecureShell.UserName = "Hello"[/INDENT]
[INDENT] ThisTerminal.ConnectionSettingsSecureShell.SSHShowBannerDialog = False[/INDENT]
[INDENT] ThisTerminal.ConnectionSettingsSecureShell.SSHTermWindowAuth = True[/INDENT]
[INDENT] ThisTerminal.Save[/INDENT]
[INDENT]End Sub[/INDENT]

Regards,
Tom
0 Likes
bj407k Contributor.
Contributor.

Re: Reflection Secure Shell Client control password dialog b

Thanks, @TomFitz .  I have not been able to find a ThisTerminal object nor a SSHTermWindowAuth connection parameter in the version I am using.

Sorry for the delay, too many shiny objects.

Hope springs eternal,

Rodgers

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.