我认为我的正确问题是在删除重要文件后如何重建SSH。但是我无法再在线修复此问题。
我有一个答案,您可以将其链接以供其他人查找。
每次我在PuTTy或任何其他SSH客户端/ sftp客户端中打开连接时,都会收到以下消息: Network Error: Software caused connection to abort
~/.ssh/authorized_keys
。
而且我/etc/ssh/sshd_config
看起来很好。
我的命令仍然可以执行,因此我仍在的终端中没有任何互联网问题,但是如果离开它,则无法重新连接。
我的VPN安装在Debian GNU / Linux 7(轻巧)上,PC是Windows 10
我有大约一天没有重新启动PC,可以尝试重新启动,但在关闭连接之前无法重新启动。
> 21:07:57 Status: Disconnected from server 21:07:57 Status: Resolving address of SERVER
> 21:07:57 Status: Connecting to SERVER:PORT...
> 21:07:57 Status: Connection established, waiting for welcome message...
> 21:07:57 Trace: CRealControlSocket::OnClose(0)
> 21:07:57 Trace: CFtpControlSocket::ResetOperation(66)
> 21:07:57 Trace: CControlSocket::ResetOperation(66)
> 21:07:57 Error: Could not connect to server
> 21:07:57 Status: Waiting to retry...
> 21:08:02 Status: Resolving address of SERVER
> 21:08:02 Status: Connecting to SERVER:PORT...
> 21:08:02 Status: Connection established, waiting for welcome message...
> 21:08:02 Trace: CRealControlSocket::OnClose(0)
> 21:08:02 Trace: CFtpControlSocket::ResetOperation(66)
> 21:08:02 Trace: CControlSocket::ResetOperation(66)
> 21:08:02 Error: Could not connect to server
就像我的计算机拒绝打开新连接一样,因为我已经拥有该连接就可以了。
/etc/ssh/sshd_config
查看文件时,我记得我使用身份验证密钥登录时,女巫就像对我的服务器最重要的事情,每当发生任何事情时,我都会非常害怕。话虽如此,我不会只用密码来启动服务器。
我得到这个启示,我应该检查身份验证日志,发现了这一点:
Sep 27 08:11:30 Host sshd[XXXXX]: Did not receive identification string from <IP-address>
我已经准备好了,我将返回更多信息。
原来那不是我,我没有认出该IP,因为它来自中国。但是现在我知道我的登录尝试未到达服务器。
Witch会解释为什么我会这么快出现网络错误,就像在尝试与服务器通信之前一样。
此时,我应该查看如何为服务器重建SSH,但是我认为我的提供商需要注意这一点,因为我无法连接并且服务器位于该国的另一端。
必须在/ etc / ssh / sshd_config中允许用户“ root”的连接
对于没有$ HOME(主目录)的帐户,不允许交互式登录
因此,对于问题的第一部分:
许可RootLogin
Specifies whether root can log in using ssh(1). The argument must be ``yes'', ``without-password'', ``forced-commands-only'', or ``no''. The default is ``no''. Note that if ChallengeResponseAuthentication is ``yes'', the root user may be allowed in with its password even if PermitRootLogin is set to ``without-password''. If this option is set to ``without-password'', password authenti- cation is disabled for root. If this option is set to ``forced-commands-only'', root login with public key authentication will be allowed, but only if the command option has been specified (which may be useful for taking remote backups even if root login is normally not allowed). All other authentication methods are disabled for root. If this option is set to ``no'', root is not allowed to log in.
第二:
登录时查找'/ etc / passwd'与用户是否一致,并创建具有适当权限的正确主目录
顺便说一句:使用您的filezilla sftp连接或直接访问
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句