用root用户及密码可以直接登陆某LINUX系统,但是用ssh登陆,系统却总是提示密码不对

检查一下/etc/ssh/sshd_config,看看PermitRootLogin 项

该文件的内容是:

# Set this to 'yes' to enable PAM keyboard-interactive authentication
# Warning: enabling this may bypass the setting of 'PasswordAuthentication'
#PAMAuthenticationViaKbdInt no

#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression yes

#MaxStartups 10
# no default banner path
#Banner /some/path
#VerifyReverseMapping no

# override default of no subsystems
Subsystem    sftp /usr/libexec/openssh/sftp-server

把该项改为yes即可

你可能感兴趣的:(Linux)