Chinaunix首页 | 论坛 | 博客
  • 博客访问: 360733
  • 博文数量: 135
  • 博客积分: 425
  • 博客等级: 下士
  • 技术积分: 599
  • 用 户 组: 普通用户
  • 注册时间: 2012-10-19 21:10
文章分类
文章存档

2014年(3)

2013年(79)

2012年(53)

分类:

2013-01-04 09:22:26

sshd问题:A protocol error occurred. Change of username or service not allowed

在研究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远程登陆:

阅读(3015) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~