Trying to set up a systemd service to handle ssh socks proxy so I can have a browser appear to come from outside my network.
This is what I have built.
/code
[Unit]
Description=Persistent SSH Tunnel from port 8080 to host (actual host specified in script) for socks proxy
After=network.target
[Service]
Restart=on-failure
RestartSec=5
ExecStart=/usr/bin/ssh -p 22222 -i /etc/ssh/tunnels/socks-proxy -NTC -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -D 8080 user@host ( actual script has this specified)
[Install]
WantedBy=multi-user.target
/code
If I copy and past the ExecStart command into a root terminal, it runs properly, but running the systemd service I get error of :
socks-proxy-tunnel.service: Unable to locate executable ‘/usr/bin/ssh’: Permission denied
May 07 02:10:29 fedorabyte (ssh)[5070]: socks-proxy-tunnel.service: Failed at step EXEC spawning /usr/bin/ssh: Permission denied
May 07 02:10:29 fedorabyte systemd[1]: socks-proxy-tunnel.service: Main process exited, code=exited, status=203/EXEC
May 07 02:10:29 fedorabyte systemd[1]: socks-proxy-tunnel.service: Failed with result ‘exit-code’.
Any suggestions?