linux端口连接错误_Linux“由于身份验证错误而拒绝了X11连接”错误和解决方案...

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端口连接错误

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值