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
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
检查磁盘是否已满(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
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
检查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
We should uncomment line ForwardX11 no and change to yes.
我们应该取消注释ForwardX11行,并更改为是。
翻译自: https://www.poftut.com/linux-x11-connection-rejected-wrong-authentication-error-solution/
linux端口连接错误