码迷,mamicode.com
首页 > 其他好文 > 详细

禁止root远程登录 sshd问题:A protocol error occurred. Change of username or service not allowed

时间:2014-10-28 23:49:01      阅读:285      评论:0      收藏:0      [点我收藏+]

标签:http   io   ar   使用   sp   文件   on   art   问题   

在研究Linux安全的时候遇到一个问题,原本打算修改linux直接远程root登陆,修改为sshd的配置文件后

Nano /etc/ssh/sshd_config
把#PermitRootLogin yes
修改为PermitRootLogin no
修改完成后,保存退出
重启sshd

service sshd restart

新建一个普通用户

Useradd unixbar Passwd unixbar 

在securecrt远程工具中,使用普通用户登陆的时候,出现了

The server has disconnected with an error. Server message reads: A protocol error occurred. Change of username or service not allowed: (shang1,ssh-connection) -> (shang,ssh-connection)

这样类似的错误。

这是由于securecrt设置的原因导致的。把你的用户名改成unixbar。就可以了,这样做了以后就可以实现禁止root远程登陆:

bubuko.com,布布扣

禁止root远程登录 sshd问题:A protocol error occurred. Change of username or service not allowed

标签:http   io   ar   使用   sp   文件   on   art   问题   

原文地址:http://www.cnblogs.com/wikiki/p/4058029.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!