Remote ssh login as root

I edited my /etc/default/login file and commented the line:

# If CONSOLE is set, root can only login on that device.
# Comment this line out to allow remote login by root.
#
#CONSOLE=/dev/console

I still cant login thru telnet or ssh.
What else do i have to do to be able to login remotely as root?

Thanks,
Brian

try rebooting

sorry i should have included that in my note.
Coming from Windows, I'm used to rebooting.

I did 2 reboots. same thing.

:wink:

Did you create an ssh trusted key file, an .rhosts file, or a hosts.equiv file?

the /etc/default/login file is for general use, at ssh you have to edit your /etc/ssh/sshd_config too. there is a line:
PermitRootLogin no
set the value to yes and then:
pkill -HUP sshd

greetings PRESSY

what version of ssh are you running? ssh2 or OpenSSH?

There shouldn't be a restriction on root. Can you ssh as a non root user?

Does it prompt you for a password? Try running ssh -v -v -v

and make sure all files in $HOME/.ssh are chmoded to 600

and public key of the machine you are connecting from is in authorized_keys on target machine

Thanks for the help, you guys definitly turned me in the right direction.

I was using OpenSSH and I edited the ssh_config file instead of the sshd_config file.

Something else happened that i have a question for, I made the change to the sshd_config file, then to make the change take effect I tried a pkill -HUP which didnt work, then I stop and started ssh. that did not work either.
I had to reboot my workstation to get it to take effect.

Does anyone know why that was? How can I get ssh ro re-read the config file without bouncing the box?

Hi Discussion in this thread was very useful for me i was able to solve the problem i was facing with Solaris 10 and SSH (remote root login). But this think this thread did not contain how to restart sshd on Solaris....i did search for that ....but i found the answer :b:
wanted to post that answer..so that it would be helpful to future viewers :slight_smile:

To restart sshd on sorlaris 10 execute the command:

/lib/svc/method/sshd restart

@BG_JrAdmin
Use svcadm to restart services, in this case it is:
svcadm disable ssh or svcadm enable ssh

Not sure if you use ssh or sshd, anyway this thing works as i have personally used this. Also for telnet you can use svcadm enable telnet....Remember that root cannot login using telnet by default coz of plain text authentication, so use a normal user during telnet then su to root user. :b:

At times you know.. svcadm disable/enable ssh will still show that the service is offline. Even the inetd you wont be able to restart. In this type of situation, what will you do?

@incredible
I have not encountered such situation...even if i come across...i will post it here...u guys are here right....:D;)

Yes bro, I think you won't believe me.. I have experienced that ssh not starting stubbornly it in Solaris 9 and Solaris 10 too..

i've seen plenty of what incredible talks about with ssh (and other services as well... mostly manifest written by me :smiley: ).

you can always check /var/svc/manifest/*/<script.xml> and see where the start script is such as /lib/svc/method/<script> and try from there. or go even further to the main executable to start/stop/refresh the service.

@incredible
I believe you dude :)....coz there are many things I have still not encountered...my tryst with solaris started this march, before that I worked in unix and linux only...So I am keeping my options open...:rolleyes:

Depending on what OS you are using, if the kill -HUP doesn't help, you could try to stop sshd and restart it instead using your boot scripts.
like: /etc/init.d/sshd restart or /etc/rc.d/sshd restart