1

This Question has been asked before, but it was never answered, so here is my take on it:

I am running a headless machine in my local network and I need to manage VPN connections to the internet while logged in via ssh from inside the local network.

Managing connection on the machine directly (test phase with monitor and keyboard attached) works fine.

Managing connections on the machine when logged in via ssh as the same user using the same command throws a permission error.

So when trying to deconnect an active VPN connection when logged in directly, everything works fine. When trying to deconnect the connection when logged in remotely (via ssh), both machines being on the same local network (IP-Addresses 192.168.4.10 and 192.168.4.20), I get a permission related error:

nmcli c down myVPNcon thus leads to Connection 'myVPNcon' deactivation failed: Not authorized to deactivate connections

I guess this is not a bug but a security feature. What do I have to change or modify so I can get remote connections management to work?

3
  • Did you try to sudo this?
    – xenoid
    Commented Jul 7, 2017 at 19:56
  • sudo works, but since I don't need to sudo the command when logged in directly, I was hoping that there was a way to also do it remotely without using sudo.
    – xxm
    Commented Jul 8, 2017 at 16:18
  • Not too familiar wit the whole setup, but I have a VPN where I need to call the openconnect module directly (nmclient doesn't support an option I need) and it's sudo time. I suspect the nmclient just pass the bucket to some root-level daemon. Remember that the VPN will apply to all users of the system, so its really a global thing and must be done by root.
    – xenoid
    Commented Jul 8, 2017 at 17:34

1 Answer 1

0

I had this same issue today. It seems that nmcli tries to detect and block any remote activity via SSH. I was unable to find the config to disable this behavior, but using tmux the connection management works via ssh.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .