首页 > 其他 > 详细

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

时间:2015-07-22 16:31:11      阅读:2563      评论:0      收藏:0      [点我收藏+]

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

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)

这是因为sshd中禁用了root账户远程登录。

修改sshd配置文件:

vim /etc/ssh/sshd_config

把 PermitRootLogin no

改为 PermitRootLogin  yes

root账户即可远程登录。


或者在本地用root账户创建一个新的账户,如

useradd  user1

passwd user1

然后给一个sudo权限

vim  /etc/sudoers

找到   root    ALL=(ALL)       ALL

直接复制这一行,修改root为user1,粘贴到这行下边,all是不限定权限。

user1    ALL=(ALL)       ALL

使用user1 远程登录,然后sudo su - ,输入密码即可使用root权限。

本文出自 “Study” 博客,请务必保留此出处http://wxpan.blog.51cto.com/4861826/1677103

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

原文:http://wxpan.blog.51cto.com/4861826/1677103

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!