CLI commands to create a SSH profile, via the CLI?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

CLI commands to create a SSH profile, via the CLI?

L2 Linker

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?

1 REPLY 1

Cyber Elite
Cyber Elite

First create profile in web GUI.

Raido_Rattameister_0-1695835703153.png

 

 

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

 

 

 

Enterprise Architect, Security @ Cloud Carib Ltd
Palo Alto Networks certified from 2011
  • 1251 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!