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

在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权限。

时间: 2024-11-08 07:01:56

sshd问题:A protocol error occurred. Change of username or service not allowed的相关文章

禁止root远程登录 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 ha

A protocol error occurred. Change of username or service not allowed: (root,ssh-connection) -> (zoujiaqing,ssh-connection)

SecureCRT ssh 客户端连接失败: The server has disconnected with an error.  Server message reads: A protocol error occurred. Change of username or service not allowed: (root,ssh-connection) -> (zoujiaqing,ssh-connection) 这是因为SecureCRT设置中的用户名和你登录时候输入的用户名不相符,在这

使用SecureCRT远程链接Ubuntu出现 Change of username or service not allowed的问题

RT:    首先是确认ubuntu上有运行 sshd服务的 但是用SecureCRT链接时报错,默认用户名是root: 打开ssh_config检查下是否禁止直接用root登陆 这句 改成yes ok再次链接

安装qc 出现error An error occurred while attempting to connect to the database.

When trying to install mercury quality center starter edition 9.0 on Windows XP media center, I am getting the following error Wrong attributes  "An error occurred while attempting to connect to the database. Please check that the database is availab

Converter 转换时“A general system error occurred:SSL.

故障现象:在使用Converter进行P2V或V2V转换时,碰到了如下报错,导致无法进行下去"A general system error occurred: SSL Exception: error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol". 处理方式如下:1.显示隐藏文件,在如下路径下(以Win7为例)找到4个配置文件: C:\ProgramData\VMware\VMware vCente

Greenplum启动失败Error occurred: non-zero rc: 1的修复

某日开发反馈测试环境的集群启动失败 报错内容如下: [[email protected]:/root]$ gpstart 20181205:16:42:23:005451 gpstart:hadoop-test2:gpadmin-[INFO]:-Starting gpstart with args: 20181205:16:42:23:005451 gpstart:hadoop-test2:gpadmin-[INFO]:-Gathering information and validating

[SQL Server]A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correc

本文涉及的相关问题,如果你的问题或需求有与下面所述相似之处,请阅读本文 A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is c

Error occurred during initialization of VM java/lang/NoClassDefFoundError

因工作需要,这两天一直在RedHat Linux下配置Tomcat6.在手动安装JDK并配置完环境变量后,报出很奇怪的问题: Error occurred during initialization of VM java/lang/NoClassDefFounction...出现此问题先检查环境变量配置是否正确 如果没问题就看一下lib和jre/lib中的rt.pack.tools.pack如果发现这两个文件的话,就是因为他们没有解压我们只需要把他们解压成rt.jar和tools.jar就一切O

An error occurred at line: 1 in the generated java file问题处理

tomcat6启动后,加载jsp页面报错,提示无法将jsp编译为class文件,主要报错信息如下: An error occurred at line: 1 in the generated java file 最后确认该错误原因为:tomcat6不支持jdk1.8版本 修改jdk为1.7,刷新工程,通过!