System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

why I use telnet to loggin with root account successful ,but using SSH cannot loggin

eric_wang
Occasional Contributor

why I use telnet to loggin with root account successful ,but using SSH cannot loggin

why I can use telnet to loggin  server with root account successful ,

but using SSH which cannot loggin ,the message shows access denied

 

it is different password between telnet and ssh

 

can any one tell me why

 

thanks

 

 

3 REPLIES
Hiren N Dave
Valued Contributor

Re: why I use telnet to loggin with root account successful ,but using SSH cannot loggin

Hi,

 

# vi /opt/ssh/etc/shd_config

Check AllowUsers keyword in above file
This keyword can be followed by a list of user name patterns,
separated by spaces. If specified, login is allowed only for
user names that match one of the patterns. `*' and `?' can be
used as wildcards in the patterns. Only user names are valid; a
numerical user ID is not recognized. By default, login is
allowed for all users. If the pattern takes the form USER@HOST
then USER and HOST are separately checked, restricting logins to
particular users from particular hosts.

 

Restart the service with below command
/sbin/init.d/secsh stop
/sbin/init.d/secsh start
you need edit /etc/rc.config.d/sshd and set SSHD_START=1

 

 

 

I am an HP Employee

Was this post useful? - You may click the KUDOS! star to say thank you.
rariasn
Honored Contributor

Re: why I use telnet to loggin with root account successful ,but using SSH cannot loggin

Hi:

 

File: /etc/opt/ssh/sshd_config

 

Verify also option "PermitRootLogin":   Specifies whether a privileged user can log in using ssh(1). The default is ``yes''.

 

rgs,

 


Horia Chirculescu
Honored Contributor

Re: why I use telnet to loggin with root account successful ,but using SSH cannot loggin

@rarisan >... The default is ``yes''.

 

No, default is "no", meaning that the line starting with "PermitRootLogin" cannot be found the default behavoir is not to permit root login over ssh.

 

So you must specify:

 

PermitRootLogin yes

 

 

Best regards from Romania,
Horia.