Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Re: Who to run sshd as

Subject: Re: Who to run sshd as
Date: Tue, 31 Oct 2006 00:46:30 +0200
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?





<Prev in Thread] Current Thread [Next in Thread>