Forum Discussion
sundogbrew
Altocumulus
Apr 15, 2014tmsh script to change SSL cert
I have a lot of virtuals that use the same cert which is now potentially compromised, wondering if anyone has a tmsh script to change them all at once. I can pretty easily create a file with all the...
uni
Altocumulus
Apr 15, 2014Now that I am in front of my computer, here is the syntax you need:
tmsh modify ltm virtual my-vs profiles delete { old-clientssl } profiles add { new-clientssl }
Here is a bash one-liner which will replace profiles "old-clientssl" with "new-clientssl" in all virtuals in /Common:
tmsh list ltm virtual one-line|grep old-clientssl|cut -d' ' -f3| xargs -I_ -n1 tmsh modify ltm virtual _ profiles delete { old-clientssl } profiles add { new-clientssl }
Run this at your own risk. I suggest you change the last "tmsh" to "echo" to test it first.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects