Operating System - HP-UX
1819789 Members
3500 Online
109607 Solutions
New Discussion юеВ

only root cann't ssh to the server

 
SOLVED
Go to solution
Hanry Zhou
Super Advisor

only root cann't ssh to the server

anybody else can, and root can telnet into the serverA.

Here is the result:
ssh systemA -l root
Permission denied, please try again

Please help
none
8 REPLIES 8
Mel Burslan
Honored Contributor

Re: only root cann't ssh to the server

it may be too trivial to ask but dows root user have a ~root/.ssh directory, which is writable ?
________________________________
UNIX because I majored in cryptology...
Hanry Zhou
Super Advisor

Re: only root cann't ssh to the server

yes, there is existing ~root/.ssh and with writeable for root.

none
Steven E. Protter
Exalted Contributor

Re: only root cann't ssh to the server

Probably the root password is locked on the target server. Log onto it at the console and it will be unlocked.

I've seen this message a few times and thats always what the problem has been.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Joseph Loo
Honored Contributor

Re: only root cann't ssh to the server

hi,

a few things to check:

1) did you disable root access via ssh in the /var/adm/inetd.sec ?
2) is the permission of .ssh directory under the home directory of root given?
3) at
# /usr/lbin/getprpw root
check if alock=YES, though that is unlikely as root can telnet
4) what is the permission for /dev/tty?

regards.
what you do not see does not mean you should not believe
generic_1
Respected Contributor
Solution

Re: only root cann't ssh to the server

I think you really need to take a look at your inetd.sec file and make sure that root ssh is just not disallowed.

Also check /etc/ssh/sshd_config and make sure it is set to yes if you want root to work. :) PermitRootLogin = yes

Hope this helps.

Pratyush Paul_1
Valued Contributor

Re: only root cann't ssh to the server

This is what you do

#ssh -v -v -v -l root systemA

And try to see the debug information. It will give you a lot more info of what is happening.

Please try to remove the keys from the know_hosts file. And try to connect. The debug information will tell you exactly where openssh is failing. let me know if this works.

regards

Pratyush
Die Hard
Sridhar Bhaskarla
Honored Contributor

Re: only root cann't ssh to the server

Hi,

As mentioned by Jeff, it's most likely the sshd_config issue.

Look for PermitRootLogin in your /wherever_ssh_is_installed/etc/sshd_config and make it "yes". Restart sshd.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Hanry Zhou
Super Advisor

Re: only root cann't ssh to the server

Sri,
You solvoed the issue.
none