EasyManuals Logo

Lantronix SLC 8048 User Manual

Lantronix SLC 8048
425 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #215 background imageLoading...
Page #215 background image
9: Device Ports
SLCâ„¢ 8000 Advanced Console Manager User Guide 215
expect {
"*assword: " { send "$enablePassword\r" }
">" { set loggedIn true; set passwordPrompt true; send "enable\r"
}
"#" { set loggedIn true; set execMode true }
"Error:*\r\n" { send_user $expect_out(0,string); abortSession 5 }
timeout {set cnt [expr {$cnt + 1}] }
}
}
myprint "Logged in."
send "copy running-config tftp://$tftp/$configFile\r"
expect "$tftp"
send "\r"
expect "$configFile"
send "\r"
myprint "Backup initiated."
expect {
"!!" { myprint "Successfully backed up." }
timeout { myprint "Timeout waiting for backup to complete.";
abortSession 6 }
}
send "exit\r"
sleep .5
close
exit 0
Python Custom Script - SLC CLI Session
An example of a Python Custom Script that interacts with a CLI session:
#! python
# Script to set the RADIUS authentication settings of the SLC
# Sets the first RADIUS server and secret, and enables RADIUS
# Note: passing secret as a command line parameter is a security
vulnerability
# Usage:
# script_cli_radius.py <RADIUS server> <RADIUS secret>
#
import subprocess
import datetime
import sys
num_args = len(sys.argv) - 1
if num_args < 2:
print("Usage: script_cli_radius.py <RADIUS server> <RADIUS secret>")
sys.exit(1)
print("Settings RADIUS server on SLC at ", end="")
now = datetime.datetime.now()

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Lantronix SLC 8048 and is the answer not in the manual?

Lantronix SLC 8048 Specifications

General IconGeneral
BrandLantronix
ModelSLC 8048
CategorySwitch
LanguageEnglish

Related product manuals