Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 03-07-2014, 09:38 AM
wkolmstead wkolmstead is offline
Registered User
 
Join Date: Sep 2013
Posts: 7
Input from button

Is there a way for me to create a new button and it ask for input?

I log onto a hostbox (jumpserver) and then have to sudo up to a specific id depending on what application I am working on.

What I would like to create is a button that ssh to a server (trust already setup with jumpbox and securecrt), a box pop up asking for input<appid>, run command "sudo su - <appid>", log me in via password and end.

I am running Version 7.2.1 (x64 build 443) on Windows.

Is this something that can be done currently with secure CRT and buttons?

Thanks,

Keith
Reply With Quote
  #2  
Old 03-07-2014, 11:56 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hello Keith,

You could if the button was configured to run a script that performed those actions.

Quote:
What I would like to create is a button that ssh to a server (trust already setup with jumpbox and securecrt), a box pop up asking for input<appid>, run command "sudo su - <appid>", log me in via password and end.
By "ssh to a server", you are looking for the script to make the connection from jump host to the target destination, correct (and then perform the other tasks)?

In other words, the connection to the jump host is already established and you just want to automate from that point forward?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 03-07-2014, 02:47 PM
wkolmstead wkolmstead is offline
Registered User
 
Join Date: Sep 2013
Posts: 7
Yes, we have a handful of jump boxes that we can log into initially and then just push a button sudo up using the <appid> from input and then reads a password file for sudo.

I guess ideally I could create a session that reads a script that logs into the jump box, issues "sudo su - <appid>" (appid is given via input that is asked for), password is given via text file identified via script, then ssh to the server that I created the session for.

I did not think about doing it this way, opting for the easier route being already logged into the jump server and ssh-ing manually to my jumpserver. All I would need the button to do is to ask for what appid I would sudo up as, and then read input from a txt file for the password for sudo.

Clear as mud? :-)

--Keith
Reply With Quote
  #4  
Old 03-10-2014, 10:03 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,636
Hi Keith,

Sort of.

The reason I was asking was because we have some script examples here, but it does not include an example where already on the jump host. I was going to attach that example, but it seems like you now might be leaning towards a script that automates even more of the process.

Quote:
Yes, we have a handful of jump boxes that we can log into initially and then just push a button sudo up using the <appid> from input and then reads a password file for sudo.
I am not quite sure what you mean by "sudo up using the <appid> from input".

Does the above mean you currently have a button on the button bar configured to send a string?

Or is the button configured to run a script currently?

I have gone ahead and attached the jump host script example I had in mind.

Essentially it shows how you can take care of the secondary authentication from jump host to target.

If you wanted to prompt the user for the target device(s), you could use crt.Dialog.Prompt to ask the user for the <appid(s)>, then use that information to populate the vHosts array.

Within the "case(s)" that indicate successful authentication on the target is where you could add the Send() command to change user context.
Attached Files
File Type: txt JumpHost-HandleSecondaryHostConnectionAttempts.vbs.txt (7.1 KB, 438 views)
__________________
Thanks,
--Brenda

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 03:11 PM.