linux端口连接错误

linux端口连接错误

I have set up X desktop and want to connect to the X server through ssh. As you know ssh provides X forwarding which is a very useful feature and used a lot of system administrators.

我已经设置了X桌面,并希望通过ssh连接到X服务器。 如您所知,ssh提供了X转发功能,这是非常有用的功能,并且使用了很多系统管理员。

尝试连接Ssh X转发 (Try To Connect Ssh X Forwarding)

We will try to connect the X service of remote ssh server by providing -X parameter.

我们将尝试通过提供-X参数来连接远程ssh服务器的X服务。

$ ssh -X ubu1

OR

要么

$ nautilus
Try To Connect Ssh X Forwarding
Try To Connect Ssh X Forwarding
尝试连接Ssh X转发

We get an error like “Unable to init server: Could not connect: Connection refused” or  “/usr/bin/xauth:  /home/ismail/.Xauthority not writable, changes will be ignored”

我们收到类似“无法启动服务器:无法连接:连接被拒绝”“ /usr/bin/xauth:/home/ismail/.Xauthority不可写,更改将被忽略”的错误

更改Xauthority的所有权(Change Ownership Of Xauthority)

We will change Xauthority file ownership because it will be used by the current user to read and write.

我们将更改Xauthority文件的所有权,因为当前用户将使用它来读写。

$ sudo chown ismail:ismail .Xauthority
Change Ownership Of Xauthority
Change Ownership Of Xauthority
更改Xauthority的所有权

检查磁盘是否已满(Check Disk If It Is Full)

One of the root cause of a lot of problems is fulling disk. It is a hidden problem and generally does not show himself. We should all ways count this option for troubleshooting.

许多问题的根本原因之一是磁盘已满。 这是一个隐藏的问题,通常不会显示自己。 我们应该通过各种方式将此选项用于故障排除。

$ df -lh
df -lh
df -lh

As we can see in the third line of output our root path have enough free space to run X

正如我们在输出的第三行中看到的那样,我们的根路径具有足够的可用空间来运行X

检查Ssh Server X转发设置 (Check Ssh Server X Forwarding Setting)

The ssh server configuration has a line X11Forwarding which enables or disable X11 forwarding. It may be disabled because of security reasons.

ssh服务器配置具有X11Forwarding行,该行启用或禁用X11转发。 由于安全原因,它可能被禁用。

$ cat /etc/ssh/sshd_config  | grep X11Forwarding
X11Forward
X11前进

检查Ssh客户端ForwardX11设置(Check Ssh Client ForwardX11 Setting)

The client-side of the ssh configuration also includes X11 forwarding. It shouldn’t be disabled or explicitly enabled like below.

ssh配置的客户端还包括X11转发。 不应禁用或明确启用它,如下所示。

$ cat /etc/ssh/ssh_config | grep ForwardX11
Check Ssh Client ForwardX11 Setting
Check Ssh Client ForwardX11 Setting
检查Ssh客户端ForwardX11设置

We should uncomment line ForwardX11 no and change to yes.

我们应该取消注释ForwardX11行,并更改为是。

LEARN MORE  Linux ping Command Tutorial With Examples
通过示例了解更多Linux ping命令教程

翻译自: https://www.poftut.com/linux-x11-connection-rejected-wrong-authentication-error-solution/

linux端口连接错误

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐