- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
09-27-2023 05:04 AM
I'm working on a Python script to change permitted-ip addresses on interfaces, uploading it to my resumé to send out.
I'm fairly new to paloalto, however I'm familiar to some extent with firewalls, and familiar with routers/switches.
I want to create a ssh profile via the CLI to have Python login and modify interface management profiles and add permitted-ip's, then I will test connectivity before and after the change via the script...
I need to create a SSH profile via the CLI, can someone show me how to do this? Much of the documentation I've run across pints to the GUI.
For example a profile with username/pass : palto/Palto123 how would I create this via CLi?
09-27-2023 10:30 AM
First create profile in web GUI.
Log into CLI.
Run following command to change fw output from xml to set
> set cli config-output-format set
Change to configure mode.
> configure
Run command and filter our new SSH profile.
# show | match testprofile
Output gives you commands that you can use in your script to generate same profile using CLI next time.
set network profiles interface-management-profile testprofile permitted-ip 10.0.0.5
set network profiles interface-management-profile testprofile https no
set network profiles interface-management-profile testprofile ssh yes
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!