#1
|
|||
|
|||
Tabname
Hi,
Sorry to open a thread, but I'm desperate. I really checked for hours for a solution to my problem. If there is THE existing thread, which could bring me to my solution, please just paste me the link... Read several, got no working solution. Situation: I connect over sessions to linux jumphosts, from there to network devices (mostly cisco routers). I would like the to have the tab name to be set to the actual hostname of the device I am connected to. How can this be done as easy as possible? Thank you for any help. |
#2
|
|||
|
|||
Hi pfistyle,
It's likely the info is in several threads, but it's easier just to cover it again than to find it. (One of the reasons we prefer you just contact support@vandyke.com instead of using forums.) ![]() First, though, have you considered using the alternate way of connecting through jump hosts implemented in v7.1: Changes in SecureCRT 7.1 (Beta 1) -- February 26, 2013 ------------------------------------------------------ New features:
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Hi Brenda,
Thank you for your help. I don't think that option would fit for me. I need to be able to work on the jumphost and sometimes connect to another host (router). As soon as I connect, I would the tabname to be the same as the hostname of the device I'm logged in on... Normally I have several tabs open and would like to know, if they are connected to the jumphost or any other device. |
#4
|
|||
|
|||
Hi pfistyle,
No worries, that is the case on occasion unfortunately. Are you on Windows or Mac? I think the attached script is the best solution but presently it is VBScript only. It does require you configure it as a logon script so that it is "always ready" for when you might "ssh host". See the comments in the script. If that won't fit your environment, let me know. There might be another solution.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
Hey Brenda,
It works almost perfectly, thank you. The only problem is, that when I log out of a host and connect to another, the tab name stays the same as the hostname of the device I connected to first. Is there a solution for this problem? Thanks! |
#6
|
|||
|
|||
Hi pfistyle,
Please describe how you are doing this (in detail): Quote:
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#7
|
|||
|
|||
Hey,
I am logged into a linux jumphost. Then I connect to a router (A) --> the tab name is changed to it's hostname Then I exit the router Then I connect to another router (B) --> the tab name stays router A's hostname Thank you. |
#8
|
|||
|
|||
Hi pfistyle,
How do you connect to router (A)? Do you type "ssh routerA"? How do you exit the router? Do you type "exit"? How do you connect to router (B)?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#9
|
|||
|
|||
Hi Brenda,
I do a ssh or telnet to router A I do an "exit" to log out router A I do a ssh or telnet to router B Thx. |
#10
|
|||
|
|||
Hi pfistyle,
Does the jump host shell prompt match router B's? That's the one caveat to using this script. The jump host's shell prompt must be different and unique from any other shell prompt in order for the script to work properly. That's how it detects you have exited a session with a host. Can you change your prompt on the jump host?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#11
|
|||
|
|||
Hi Brenda,
I log in/out like this: me@linux:~$ t router1 Trying 2.2.2.2... Connected to router1 This system is for the use of authorized users only. Username: me Password: router1#exit Connection closed by foreign host. me@linux:~$ t router2 Trying 1.1.1.1... Connected to router2 This system is for the use of authorized users only. Username: me Password: router2#exit Connection closed by foreign host. me@linux:~$ After connecting to router1, the tab name stays router1... Thank you! |
#12
|
|||
|
|||
Hi pfistyle,
Change line 40 in the script to accommodate your $ prompt. From: Code:
strText = objTab.Screen.ReadString("#", ">", 5) Code:
strText = objTab.Screen.ReadString("#", ">", "$", 5)
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#13
|
|||
|
|||
Hi Brenda,
Thx, but this does not help. Now the tabname stays always the name of the jumphost I connect to initially. Thank you! |
#14
|
|||
|
|||
Hi pfistyle,
Is Cancel available from the Script menu? If so, if you select it, what is the error message?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#15
|
|||
|
|||
Hi pfistyle,
I misunderstood the execution of the script, I thought it was designed to run until cancelled, but that is not the case. Try the new attached one.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|