Re: Who to run sshd as



I am not sure if you can run sshd as a non root user, or if you can, I think there will be problems like updating wtmp, etc.

Anyway... Try to set sshd to bind in a port greater than 1024(Port directive in sshd_config file).
If you want to bind to port 22 as a non root user try to put a rule in the nat table (in PREROUTING chain) like the following.

iptables -t nat -I PREROUTING -i eth0 -p tcp --dport 6665 -j REDIRECT --to-ports 22

where 6665 is the port where sshd will listen
and eth0 the interface of your linux box

If you can make it to run as sshd as a different user successfully please give some tips

Regards

Yiannis

James Stickland wrote:
Hello, im running openssh 4.4p1 for Linux

I setuid the sshd binary to execute as a normal user "joe"
but that user does not have permission to bind the socket.



How can i have my sshd run as non-root, yet still bind the socket?