question |
For security reasons, the default parameters are very strict. It is forbidden for root users to directly use ssh to log in . For example, use a non-root account first. After logging in to ssh, su becomes root. |
solution |
If you want to log in directly with root, modify the following configuration file: vi /etc/ssh/sshd_config Find the following line, remove the # symbol in front, and modify no to yes #PermitRootLogin no to: PermitRootLogin yes Next, execute the following Command to restart the SSH service: xxx# /etc/rc.d/sshd restart Stopping sshd. Waiting for PIDS: 349. Starting sshd. xxx# After the restart is complete, ssh can log in |