Configure SSH connection permissions for new users
vi /etc/ssh/sshd_config
PermitRootLogin no
#AllowUsers Username
AllowGroups user group
service sshd restart
or
/bin/systemctl restart sshd.service
SecureCRT
---------------------------
Failed to connect to session ip:
The server has disconnected with an error. Server message reads:
The server has disconnected with an error. Server message reads:
A protocol error occurred. Change of username or service not allowed: (root,ssh-connection) -> (新用户名,ssh-connection)
This is because the username in the SecureCRT settings does not match the username you entered when logging in. You can change it here:
Options -> Session Options -> Connections -> SSH2 -> Username
After the modification, the login is normal, so the root login of the server can be disabled (for security).