Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-14-2014, 05:21 PM
hellfire hellfire is offline
Registered User
 
Join Date: Oct 2012
Posts: 15
CRT closes host connection when closing tab

Good evening,

Im using CRT 6.5.1 for some time now and absolutelly love its flexibility, still ove got a small issue that i cant fix.

Giving some sence of context, Ive got a script that is loging-in to a remote host through a series of in-between hosts.

Previously it was an "ssh host1->telnet host2->telnet host3" path. Host1 stays the same, 2nd and third changes. Now i have to work with other scheme, "ssh host1->ssh host2->telnet host3", when host1 and host2 doesnt change, and host3 is varyable.

The problem is, if I do open multiple tabs to different host3 servers throught the same host2, when I close any of it, all other tabs got disconnected from host2. This is only true to ssh-ssh-telnet scheme, it doesnt disconnect when usin ssh-telnet-telnet.


Here is an example of what im talking about..
Run, %CRTClient% /SCRIPT somesxript.vbs /T /SSH2 /L %host1login% /PASSWORD %host1pass% %host1%

somesxript.vbs:
Code:
#$language = "VBScript"
#$interface = "1.0"
Sub main
crt.Screen.Synchronous = True
g_nDelay = 50		
crt.Screen.WaitForString "$ "
crt.Screen.Send "ssh %host2login%@host2" & vbCr
Dim result
result = crt.screen.WaitForStrings("assword:", "Last login:",10)
Select Case nResult
Case 0
 crt.Screen.Send "%host2pass%" & vbCr
Case 1
crt.Screen.WaitForString "$ "
End Select
crt.Screen.Send "clear" & vbCr
crt.Screen.Send "telnet%TelnetEchelon%.sh %host3% " & vbCr 
crt.Screen.WaitForString "ame:"
crt.Screen.Send "%host3login%" & vbCr
crt.Screen.WaitForString "ass"
crt.Screen.Send "%host3pass%" & vbCr
crt.Screen.Synchronous = False
End Sub
Sorry, i know its kinda unusual issue..
Reply With Quote
  #2  
Old 06-19-2014, 04:52 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi hellfire,

Thanks for the post.

I have created a test environment that tries to reproduce what you describe, and I don't see any issue.

I wonder if I don't have a full understanding of the problem.

In my test I have one SecureCRT window with three tabs (from running the script 3 times). Each tab is connected through two jump servers using SSH2, and the final host is connected using telnet. If I close a tab, the other tabs remain open with no disconnect.

Is this what you are doing?

If not, would you help me understand how my test is different from your scenario?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #3  
Old 06-19-2014, 09:53 PM
hellfire hellfire is offline
Registered User
 
Join Date: Oct 2012
Posts: 15
Quote:
Originally Posted by rtb View Post
Hi hellfire,

Thanks for the post.

I have created a test environment that tries to reproduce what you describe, and I don't see any issue.

I wonder if I don't have a full understanding of the problem.

In my test I have one SecureCRT window with three tabs (from running the script 3 times). Each tab is connected through two jump servers using SSH2, and the final host is connected using telnet. If I close a tab, the other tabs remain open with no disconnect.

Is this what you are doing?

If not, would you help me understand how my test is different from your scenario?
Thanks for the reply.

Yes, exactly. 1 window, 3 tabs, sshA-sshB-telnet1, sshA-sshB-telnet2, sshA-sshB-telnet3.

I connect to the "shhA" host using command line params when launching CRT, then I'm connecting to "sshB" host using .vbs script, and then to telnet1/2/3 host within the same script.

If I change the order of ssh hosts (say, sshB-sshA-telnet1/2/3), the issue stays, when i terminate any telnet connection in one of the tabs, it disconnects from all three sshA connections, and the sshB remains
Reply With Quote
  #4  
Old 06-20-2014, 04:25 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi hellfire,

I still can't reproduce your results. How are you exiting one of the telnet connections?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #5  
Old 06-22-2014, 01:55 PM
hellfire hellfire is offline
Registered User
 
Join Date: Oct 2012
Posts: 15
both the "timeout" disconnect and manual exit..maybe i should record it and show? i guess we are missing some small but critical detail here
Reply With Quote
  #6  
Old 06-23-2014, 04:45 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi hellfire,

If you have the ability to make a recording, it may be helpful for me to see how my tests differ from yours.

If you want to send it via email, please send the video to support@vandyke.com with a subject of Attn: Todd - forum thread 11557.
__________________
--Todd

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

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 07:47 AM.