Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-20-2020, 08:40 AM
darkknight darkknight is offline
Registered User
 
Join Date: Dec 2006
Posts: 8
Script to jump through console server (opengear)

I have hopefully an easy problem..

I use an opengear to get to the console ports on our network. I want to use either the builtin "Logon Actions" or a script to automate the login.

I put the Logon Actions together, but can't figure out one thing. I need to send a carriage return in the middle of the flow...

The flow is like this:

ssh 1.1.1.1 3001 (this is taken care of by the SSH2 section) without using the username and password stored there.

I have the "show login prompts in terminal window" turned on

Then the logon actions as follows:

sername: username1
ssword: pass1 (hidden)
<NEED carriage return to get the next set of prompts>
sername: username2
ssword: pass2 (hidden)


The part I cannot figure out how to do is the carriage return in the middle.

If a login script would be more appropriate, can I get an example of how to do it as all the examples I have found seem to rely on the username and password stored in the SSH2 section. This would be fine if the username and password were the same for both. They are different. I also can't have the passwords in the script in cleartext so I have not figured out a way to so this with scripts either.

Any help would be appreciated.
Reply With Quote
  #2  
Old 02-20-2020, 10:30 AM
berdmann berdmann is offline
VanDyke Technical Support
 
Join Date: Aug 2017
Posts: 319
Hi darkknight,

You should be able to accomplish this by adding a \r to the tail of your first password and then your logon actions should succeed.

Does that work for you?
__________________
Thanks,
--Brittney

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730

Last edited by berdmann; 02-20-2020 at 12:58 PM.
Reply With Quote
  #3  
Old 02-24-2020, 09:55 AM
darkknight darkknight is offline
Registered User
 
Join Date: Dec 2006
Posts: 8
Thumbs up

That did it.

Can you point me to a link for a list of all the "extra" things I can put at the end like that?

Appreciate the help
Reply With Quote
  #4  
Old 02-24-2020, 10:25 AM
berdmann berdmann is offline
VanDyke Technical Support
 
Join Date: Aug 2017
Posts: 319
Hi darkknight,

I sure can! Please refer to the following graphic of the "Send String and Function Key Commands" table from SecureCRT's Help:

Attached Images
File Type: png SecureCRT_Help_SendString.png (57.1 KB, 47 views)
__________________
Thanks,
--Brittney

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 09:44 PM.