Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Matthew_LaComb
Explorer

Sharing a session with GUI and Gaia/expert

I've been toying with mgmt_cli and love the flexibility - is there any way to share this session with the gui?  The Command Line given in the GUI works fine, but limits how much I can do in one shot (paste).

I'm aware of the continue-session-in-smartconsole, but that appears to log the mgmt_cli out so no more changes for that session, but the GUI gets the unpublished changes.

0 Kudos
3 Replies
PhoneBoy
Admin
Admin

If you use mgmt_cli -r true, this basically does a login/publish/logout behind the scenes.
If you login with a proper session via mgmt_cli, that session can be "taken over" in SmartConsole just like any other session.
For example:

[Expert@mgmt:0]# mgmt_cli login
Username: phoneboy
Password:
uid: "5195aab6-4db5-409a-8d80-af630bd7cefe"
sid: "sJU7Ql86il8u7Fn3DGjgZ2fNTM5ZzELYiLkZCTdg2CU"
url: "https://127.0.0.1:443/web_api"
session-timeout: 600
last-login-was-at:
posix: 1544277634568
iso-8601: "2018-12-08T06:00-0800"
api-server-version: "1.3"

[Expert@mgmt:0]# mgmt_cli --session-id sJU7Ql86il8u7Fn3DGjgZ2fNTM5ZzELYiLkZCTdg2CU add-host name foobar ipv4-address 3.1.3.7

Now you can see the session in SmartConsole and take it over:

Screen Shot 2019-05-10 at 4.28.31 PM.png

And the object I created via mgmt_cli is there:

Screen Shot 2019-05-10 at 4.32.32 PM.png

 

 

0 Kudos
Matthew_LaComb
Explorer

Yes, but the session is "taken over"  - is there any way to get the session back to my mgmt_cli?  Ideally, it would be nice to share the session between the mgmt_cli and the gui so I can work and compare.

0 Kudos
PhoneBoy
Admin
Admin

You take it back over on the CLI:
https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/take-over-session~v1.4%20

Basically, two things cannot use the same session at the same time.
But you can easily switch between SmartConsole and mgmt_cli.
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events