当前位置:首页 > 图灵资讯 > 技术篇> 配置新用户的SSH连接权限
配置新用户的SSH连接权限
发布时间:2023-04-29 09:35:01
配置新用户SSH连接权限
vi /etc/ssh/sshd_config
PermitRootLogin no
#AllowUsers 用户名
AllowGroups 用户组
service sshd restart
或者
/bin/systemctl restart sshd.service
SecureCRT
---------------------------
连接到会话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)
这是因为SecureCRT设置中的用户名与您登录时输入的用户名不一致,所以您可以在此更改:
选项 -> 会话选项 -> 连接 -> SSH2 -> 用户名
修改后登录正常,可禁用服务器ROOT登录(为安全)。
ps 图灵课堂老师从近一百套最新一线互联网公司面试题中精选而出,涵盖Java架构面试 所有技术栈,包括JVM,Mysql,并发,Spring,Redis,MQ,Zookeeper,Netty, Dubbo,Spring Boot,Spring Cloud,数据结构与算法,设计模式等相关技术领域的大 厂面试题及详解。 详情咨询客服获取全套面经试题。