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遠程登陸:

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章