I need to be able to run a socks4 server (the best through ssh -D) I can't put together a config file for xinetd, can anyone give me a hand? Thanks!
It's pretty straighforward. Try this. If you have problems with privilege separation, you'll need to create a little script to make /var/run/sshd, and chmod 0755 it, then call
EDIT. The first time around I completely misread the question, and assumed you just wanted sshd running in xinetd on the remote side of your tunnel, so it would just wake up when you needed your tunnel. Instead, what you're really looking for is a way to have the ssh client wake up when you need the proxy tunnel and automatically bring up the tunnel for use.
Then add the service-name 'socks-proxy' to /etc/services. Or change the service name to match an existing service from /etc/inetd with the port you'll be using. You'll need the ssh key to allow for paswordless authentication. The -f should fork the ssh to the background. You may have to tune the args a bit, but something like this should work.