View Single Post
  #1  
Old 06-04-2019, 03:03 AM
ecox ecox is offline
Registered User
 
Join Date: Jan 2019
Posts: 38
Question Questions regarding "Read Data From Separate Hosts/Commands"

Hi folks,

as mentioned in the subject, I have a question about this script "Example: Read Data From Separate Hosts/Commands File And Log To Individual Files"

Quote:
Allow host to be specified as either existing sessions in the
session manager (in which case the existing session is used to
establish the connection), or a hostname/IP which which an ad
hoc connection is made. To force SecureCRT to make an ad hoc
connection even if an existing session is found to match the
host entry specified, set g_bUseExistingSessions = False below.
If a host matches an existing session, and the session has
a saved username and password (or Automate Logon option is
enabled, the script will not send any credentials in the Connect()
function defined below. Instead, it is expected that the session
will authenticate itself using credentials stored within the session.
I do not understand that, my problem is:
SecureCRT opens a new session for each device. Why does not he execute the commands on the session I'm on? It's important that he does that from the session I've chosen.

How can i handle this?

1) Connect to the devices (hosts.txt)
2) set up commands then exit and go to the next device in host-list
3) log this to a single-file....

Greets
ecox
Reply With Quote