*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have recently install a new bsd box and i would like to enable root logins through ssh from differenet hosts other than the localhost. What to i need to change to be able to login from my home pc to the box using root as the user.
Another problem i hav is tha i can't su once im logged into the box with my username. How can i get that working aswell?
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
I would strongly advise against allowing root to login via ssh, that is just asking for trouble.
On BSD you must be a member of the "wheel" group in order to su to root. Again though, su'ing to root is not advised. You should investigate and implement sudo for administration tasks. That will let you run individual commands with root privilages.
I would also highly recommend avoiding this. If you insist on doing this change some of the
ttyp* none network
lines in /etc/ttys to
ttyp* none network secure
/etc/ssh/sshd_config: add the line
PermitRootLogin yes
This should do it... PLEASE DO NOT DO IT THOUGH. Just because it is possible doesn't make it wise... just login as yourself, have yourself in the wheel group, and su -.
Originally posted by chort I would strongly advise against allowing root to login via ssh, that is just asking for trouble.
On BSD you must be a member of the "wheel" group in order to su to root. Again though, su'ing to root is not advised. You should investigate and implement sudo for administration tasks. That will let you run individual commands with root privileges.
Here is what I would say, because it's so like the Mac I now use and love! Nice, Chort, couldn't add a character to this post my su to root really must be a local function only
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.