Skip to content

OVPN problem #98

@og900aero

Description

@og900aero

First of all, let me congratulate you, because this program is really fantastic. I only used fzf, but yours is much nicer :)
However, I ran into a problem. For me, the beginning of the config file looks like this:

Host *
	Protocol 2
	IdentityFile ~/.ssh/nio
	Match host SAMBA exec "nmcli connection up TRS 2> /dev/null"
	Match host ICINGA2 exec "nmcli connection up TRS 2> /dev/null"

What this does is open an opvn connection for the listed servers. This works fine. However, when I exit the server, the OVPN connection does not terminate. Is there a way to tell the command to run a local command when I exit the server? I have an script, when solved this problem, if I use base ssh command:

#!/bin/bash

eval ssh '$@'
rc=$?
nmcli connection down TRS > /dev/null 2>&1
exit "$rc"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions