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 02-14-2018, 05:36 AM
ogun ogun is offline
Registered User
 
Join Date: Sep 2013
Posts: 15
Script for centrally managed sessions

Hello all.

Just figured I would share the script we're using to share a common set of sessions.

There are three parts, a client installation script that configures a securecrt client after installation, a client script that runs on each startup and a server script that exports the sessions to be used.

The server script fetches data in our case from the IPAM and generates a json file with the the shared sessions to use. This file is places on a windows file server and on a webserver for windows and linux clients respectively. I will not share the server script but I will share an example data file, the format is trivial in any case.

The client installer script will fetch and install the shared session script, set up a bastion session with dynamic port forwarding, configure a firewall for that port and then finally modify the default session to use that firewall. It also sets up the bastion connection as an autoconnection and the session script as a login script to update the sessions.

Finally the shared session script fetches the json file created by the server script and parses it into sessions. It does delta diffs and will only create/remove sessions as needed. Before deleting any session it will show how many would be deleted. It creates sessions by copying the default session.

The code is somewhat commented but should be fairly straight forward to read in any case.
Attached Files
File Type: txt devices.json.txt (209 Bytes, 456 views)
File Type: txt install.py.txt (4.6 KB, 515 views)
File Type: txt sessions.py.txt (7.1 KB, 531 views)
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 03:14 AM.