简体   繁体   English

无法连接到远程计算机'ssh_exchange_identification:读取:连接被对等方重置'

[英]Cant connect to remote machine 'ssh_exchange_identification: read: Connection reset by peer'

I have right to remote server, For some reason I have to give access to my tomcat user. 我有权使用远程服务器,出于某种原因,我必须授予我的tomcat用户访问权限。 But by mistake I had changed user and group to tomcat7 user by below command: 但是由于错误,我通过以下命令将用户和组更改为tomcat7用户:

chown -R tomcat:tomcat /

Then I am not able to login my virtual box using ssh and filezilla. 然后,我无法使用ssh和filezilla登录我的虚拟盒子。 getting below error: 低于错误:

ssh root@hostname ssh_exchange_identification: read: Connection reset by peer ssh root @ hostname ssh_exchange_identification:读取:对等方重置连接

Ouch, if that chown cmd succeeded you must have been executing it as root and if so - I'm afraid you changed the owner and group for the entire filesystem - I don't think you can recover your system entirely anymore. 哎呀,如果chown cmd成功,那么您必须已经以root用户身份执行它-如果这样-恐怕您更改了整个文件系统的所有者和组-我认为您无法再完全恢复系统了。

You might be able to (but don't keep your hopes up): 也许可以(但不要抱太大希望):

  • ssh tomcat@hostname ssh tomcat @主机名
  • su - su-

This would give you a chance to salvage some stuff. 这将使您有机会挽救一些东西。

Don't reboot the system - it'll likely not come back up again. 不要重新启动系统-它可能不会再次恢复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM