PuTTy 登录超时和 X11 转发

PuTTy 登录超时和 X11 转发

我正在使用 PuTTy 和 X11 转发 (XMing),并尝试简单地登录到我网络中的 Linux PC,我想从中启动图形应用程序。我正在遵循本教程http://www.geo.mtu.edu/geoschem/docs/putty_install.html逐个字母。当我指定主机名并输入用户名时,首先系统不会要求我输入密码,其次,我得到了以下输出:

login as: stzanos
Last login: Thu Aug 29 17:02:14 2019 from <my pc>
/usr/bin/xauth:  timeout in locking authority file 
<other pc>/stzanos/.Xauthority
'abrt-cli status' timed out
-bash: <other pc>/stzanos/.bash_profile: Permission denied
-bash-4.2$

我认为可能是 XMing 导致了这个问题,所以我尝试在没有 X11 转发的情况下进行 ssh,得到了类似的结果:

login as: stzanos
Last login: Thu Aug 29 17:04:58 2019 from <my pc>
'abrt-cli status' timed out
-bash: <other pc>/stzanos/.bash_profile: Permission denied
-bash-4.2$

这很奇怪。输入用户名和密码后,我可以从 CentOS VirtualBox 登录,$ssh -Y <other pc>但当我尝试使用 PuTTy 从 Windows 10 登录时却无法登录。这是 XMing 问题吗?我是不是漏掉了什么?另一台电脑会不会阻止我的用户从 Windows 输入?我非常困惑

在此先感谢任何帮助或评论

答案1

您尝试连接的机器存在问题。文件 .bash_profile 没有正确的权限。每当您尝试打开登录 shell 时,都会执行此文件。

您可以删除该文件(因为它不是明确需要的),或者您可以修复权限。

要删除该文件,我只需重命名它,因为也许您以后可能会需要它。

mv ~/.bash_profile ~/old_bash_profile

权限可能应该由所有人读取和执行,由用户写入。这就是755权限代码。

chmod 755 ~/.bash_profile

相关内容