vlaci / openconnect-sso

Wrapper script for OpenConnect supporting Azure AD (SAMLv2) authentication to Cisco SSL-VPNs
GNU General Public License v3.0
295 stars 127 forks source link

Allow configuring a command to be automatically run when disconnecting from VPN (take 2) #33

Closed jherland closed 3 years ago

jherland commented 3 years ago

I configure my SSH with ControlMaster connections that must be closed when I disconnect from VPN, otherwise they are left stale and existing and future SSH session are left hanging/wedged.

To accomodate this, the last patch in this series teaches openconnect-sso automatically run a configured command on VPN disconnection. In my case, I run a shell script that does ssh -O exit ... on my connections, although this doesn't matter from openconnect-sso's POV.

Otherwise the other patches are only tangentially related:

This supersedes https://github.com/vlaci/openconnect-sso/pull/32, but is based on develop instead of master, as I found it easier to get this done on top of those changes.

vlaci commented 3 years ago

I'll check it out tomorrow.

jherland commented 3 years ago

Pushed updated version with requested changes.

vlaci commented 3 years ago

Thank you for your contribution. Will try to publish a new release this weekend.