What change in freeBSD OS to allow root logging using ssh?

Hi everybody, ]

I would like to ask just simpe and short question. I am using freeBSD 6.0 and Debian Sarge.
From Debian console I can log as root using ssh to bsd mashine but not vice versa.
When I say in bsd console su I got sorry output, it does not allow me to su to root when I am logged as ordinary user.

My question is:
what and where I shoul change in freeBSD sistem in order to allow me ssh loging as root and
loging from user shell to root shell? Is this possible?

Thank you in advance.

if i'm not mistaken, u need to be in wheel group in order to su to root.
& for using root for ssh u need to change it in sshd conf.

man sshd_config

You'll see
PermitRootLogin

Set this within your sshd_config (normally /etc/ssh/sshd_config) to
PermitRootLogin yes

Then restart the ssh daemon. Check if BSD has some mechanism that locks down root logins to the console too.... (e.g. Solaris has a CONSOLE variable in /etc/default/login - there may be a BSD equivalent - check your documentation).

Cheers
ZB

Ok, thanks for your help. I added ordinary user in wheel group and now I can su from user shell.
Also I uncomented and changed to yes in
/etc/ssh/sshd_config
line
PermitRootLogin yes
but I cannot still login from Debina machine to my freeBSD machine as root but vice versa I can do it.

It is not such big problem for me now because I can become root at remote macnine first logging as plane user and then su to root, but I am just curious about this.

I tried free BSD couple mounths ago, after two years using Debian, and now freeBSD is still running on my server, of course it is testing because I am not still good in freeBSD administration, but iti is very similar to Debian administaration and I am hoping it will become primary distribution on my server

Thank you for your help

Regards

I forgot to restart ssh deamon and i suposse it is problem why that did not work for me...

I will do it today later
:slight_smile:

When I rebooted machine everything was ok.