Good day, all. I am still pretty much a Cisco rookie and am trying to automate a task. I've been looking at Powershell, Plink and other options.
We have a series of Cisco CBS350 switches trunked together with a primary switch acting as a layer 3 router. We keep our network environment isolated from our main corporate networks; however, we have occasional instances where one of our users needs to have access to one of our test subnets. When they have access, they are creating a bridge situation which we can allow but need to limit how long they can be connected.
The solution that I need to come up with is when the user triggers the process, an automated script or similar will log on to the switch using ssh or similar, and execute these commands to configure their connect port to use an active VLAN. configure interface GE 14 switchport access vlan 102
After 2 hours, the process will then execute these commands to configure their port to a dead VLAN.
configure interface GE 14 switchport access vlan 4000
I script a lot with Powershell and am leaning toward user authentication with a public key but I am certain that the community knows of options that I have not found yet.