Autostarting sshuttle as root

0

I'm experiencing problems when autostarting sshuttle when I log in.

I'd prefer to let this program as root.

On the client I'm running Arch Linux with LXDE, and LXDM to login.

This client needs to connect to a Debian server over port 443.

Worth to mention: the command in question (sudo sshuttle -r 'user@server':443 0/0 works fine when executing manually in a terminal window.

Tried using the xinitrc for it, maybe it's possible to link a bash script to the xinitrc and execute this command from there? Again, it needs to have root without having to enter password (in autostart commands I want it completely executed without having it ask me for any input).

I'm thinking of adding it to anacrontab, but I'm hesitant since I don't completely understand this tool.

Condor

Posted 2016-02-28T20:45:18.367

Reputation: 33

Answers

0

Found it out!

Adding the sshuttle command to $HOME/.config/lxsession/LXDE/autostart did the job! In order to have the connection restart when the ssh tunnel experiences a broken pipe, I included an @ symbol before the command.

Condor

Posted 2016-02-28T20:45:18.367

Reputation: 33