Operating System - HP-UX
1753506 Members
5074 Online
108794 Solutions
New Discussion юеВ

Enable Root login using ssh

 
hemant_mopari
Contributor

Enable Root login using ssh

HI ,

I have checked the status for the PERMIT ROOT LOGIN variable in sshd_config file it is set to YES then to i am not able to login using root account i tried to restart the ssh service but then to the root login is not working while i can login using other account and can do su to root user ...

Please Help ..

Thanks & REgards

Hemant
7 REPLIES 7
Ralph Grothe
Honored Contributor

Re: Enable Root login using ssh

Ask SSH to give you some hints by
e.g.
$ ssh -v root@somehost
Madness, thy name is system administration
Jaime Bolanos Rojas.
Honored Contributor

Re: Enable Root login using ssh

Hemant,

Also check this thread out, might be able to give you a couple of hints of what is going on!

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1001507

Regards,

Jaime.
Work hard when the need comes out.
spex
Honored Contributor

Re: Enable Root login using ssh

Hi Hermant,

If '/etc/securetty' exists, the devices listed in it are the only ones which will accept a root login. A common way to increase security of your system is to only allow root login from the console. This is accomplished by echoing 'console' to '/etc/securetty'.

If this is the case for your environment, and you are alright with the security ramifications of allowing root to login from any terminal, comment out ('#') 'console' from '/etc/securetty', or delete the file (if it contains no other entries).

PCS
Doug O'Leary
Honored Contributor

Re: Enable Root login using ssh

Hey;

Spex, your comment is not accurate as it relates to ssh. The /etc/securetty only affects telnet and rlogin. ssh allows root access if so configured in sshd_config and ssh_config regardless of the contents of /etc/securetty.

As for the issue at hand: you should probably

grep -i permitrootlogin sshd_config

to ensure the parameter isn't reset somewhere else. Also check in ssh_config and ~/.ssh/config to see if anything is set in those files that might be causing it.

Failing those, as previously suggested, post the results of ssh -vvv ${target} so we can see the login process and provide some additional help.

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Yarek
Regular Advisor

Re: Enable Root login using ssh

I suggest to disable 'su to root possibility'
and install 'sudo' or something similar.




Rgds
Pupil_1
Trusted Contributor

Re: Enable Root login using ssh

the sshd_config should have 'PermitRootLogin' set to yes. Some vendors have it as 'EnableRootLogin'.
There is always something new to learn everyday !!
hemant_mopari
Contributor

Re: Enable Root login using ssh

Hi ,

Thanks to all of you for the help, but according to RALPH i have tried the command
$ssh -v root@somehost
from another machine as well as from the same machine it is working fine .
But it doesnot allow me to login by root user when using PUTTY (a ssh utility),Please help ..

Thanks & Regards
Hemant