Tra*_*lra 0 xauth google-cloud-platform
解释所有已经尝试和仔细检查的内容。
在本地 Windows 机器上设置:
Xming 安装并运行。
在 ssh_config ForwardX11 中设置为 yes。
在 VS Code 远程连接配置中,Forward X11 设置为 yes。
使用 Debian / Linux 9 和 1 GPU [免费层] 在 GCP 计算引擎上设置:
xauth 已安装。
在下面的 sshd_config 文件中设置: X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost no
sshserver 已重新启动以确保读取以下设置。从本地工作站我触发 gcloud compute ssh --ssh-flag="-X" tensorflow-2-vm(instance name) 并且响应是:
/usr/bin/xauth: 文件 /home/user/.Xauthority 不存在,
因此,我尝试在具有实例名称的远程计算引擎上执行以下操作 - tensorflow-2-vm 和用户 trapti_kalra:
trapti_kalra@tensorflow-2-vm:~$ xauth list
xauth: file /home/trapti_kalra/.Xauthority does not exist
trapti_kalra@tensorflow-2-vm:~$ mv .Xauthority old.Xauthority
mv: cannot stat '.Xauthority': No such file or directory
trapti_kalra@tensorflow-2-vm:~$ touch ~/.Xauthority
trapti_kalra@tensorflow-2-vm:~$ xauth generate :0 . trusted
xauth: (argv):1: unable to open display ":0".
trapti_kalra@tensorflow-2-vm:~$ sudo xauth generate :0 . trusted
xauth: file /root/.Xauthority does not exist
xauth: (argv):1: unable to open display ":0".
Run Code Online (Sandbox Code Playgroud)
所以,看起来有些东西丢失了,任何帮助将不胜感激。在我搬到 GCP 之前,这是使用 EC2 服务器。
小智 8
您通过 ssh 登录 Linux 服务器并收到以下错误;
.Xauthority does not exist
Run Code Online (Sandbox Code Playgroud)
解决方案:让我们进入 /etc/ssh/sshd_config 文件并删除下面 3 行开头的 # 符号
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
Run Code Online (Sandbox Code Playgroud)
然后systemctl restart sshd
再次登录就不会出现这个错误了。
| 归档时间: |
|
| 查看次数: |
22459 次 |
| 最近记录: |