【问题标题】:x2go Connection failed. bash: bash: command not foundx2go 连接失败。 bash:bash:找不到命令
【发布时间】:2018-09-18 16:59:00
【问题描述】:

我想通过 VPN (ubuntu-18.04) 从我的家用电脑连接到使用 x2go 的工作电脑 (ubuntu 18.04)。

服务器端安装:

sudo add-apt-repository ppa:x2go/stable

sudo apt-get update

sudo apt-get install x2goserver x2goserver-xsession

客户端安装:

sudo apt-get install x2goclient

我可以通过 ssh 连接到我的远程桌面,但 x2go 不起作用。问题似乎出在服务器端,因为我尝试从不同的计算机(CentOs)进行 x2go 连接并且错误是相同的。

客户端会话首选项窗口:

我尝试了会话首选项中的几乎所有内容,即使使用 RSA 密钥(我有)或单个应用程序会话类型和许多其他内容,总是出现相同的错误。

客户端调试日志:(x2goclient --debug)

x2go-INFO-1> "正在启动 X2Go 客户端 4.1.2.1..." x2go-WARNING-1> 英文 请求的语言,不加载翻译器。 x2go-WARNING-1> 英文 请求的语言,不加载翻译器。对象::连接:没有这样的 插槽 ONMainWindow::slotCheckAgentProcess() x2go-INFO-3> "已启动 X2Go 客户端。" x2go-DEBUG-../src/onmainwindow.cpp:563> "$HOME=/home/XXX" x2go-DEBUG-../src/onmainwindow.cpp:2242> 读取 1 个会话 配置文件。 x2go-DEBUG-../src/sessionbutton.cpp:342> 创建 QPixmap 带有会话图标:“:/img/icons/128x128/x2gosession.png”。 x2go-DEBUG-../src/onmainwindow.cpp:12843> libssh 尚未初始化。 初始化。 x2go-DEBUG-../src/onmainwindow.cpp:2728> 创建 带有会话图标的 QPixmap:'":/img/icons/128x128/x2gosession.png"'。 x2go-DEBUG-../src/onmainwindow.cpp:2795> 通过 Smart 启动会话 卡、SSH 代理或 Kerberos 令牌。 x2go-INFO-8> "开始连接 到服务器:192.168.29.15:22" x2go-DEBUG-../src/onmainwindow.cpp:2829> 开始与服务器的新 ssh 连接:"192.168.29.15":"22" krbLogin: 错误 x2go-DEBUG-../src/sshmasterconnection.cpp:175> SshMasterConnection,主机“192.168.29.15”;端口 22;用户“XXX”; 使用代理错误;代理服务器“192.168.29.15”;代理端口 22 x2go-DEBUG-../src/sshmasterconnection.cpp:248> 启动 SSH 连接 没有 Kerberos 身份验证。 x2go-DEBUG-../src/sshmasterconnection.cpp:252> SshMasterConnection, 实例 SshMasterConnection(0x56102247dbe0) 创建。 x2go-DEBUG-../src/sshmasterconnection.cpp:520> SshMasterConnection, 实例 SshMasterConnection(0x56102247dbe0) 进入线程。 x2go-DEBUG-../src/sshmasterconnection.cpp:840> 之前的会话端口 配置文件解析:22 x2go-DEBUG-../src/sshmasterconnection.cpp:850> 配置文件解析后的会话端口:22 x2go-DEBUG-../src/sshmasterconnection.cpp:915> 之前的会话端口 配置文件解析(第 2 部分):22 x2go-DEBUG-../src/sshmasterconnection.cpp:925> 会话端口后 配置文件解析(第 2 部分):22 x2go-DEBUG-../src/sshmasterconnection.cpp:950> cserverAuth x2go-DEBUG-../src/sshmasterconnection.cpp:991> 状态:1

x2go-DEBUG-../src/sshmasterconnection.cpp:1364> userAuthAuto 失败:"" (代码1)

x2go-DEBUG-../src/sshmasterconnection.cpp:1274> 尝试密码 机制(如果有)。

x2go-DEBUG-../src/sshmasterconnection.cpp:1278> 密码机制 可用的。继续。

x2go-DEBUG-../src/sshmasterconnection.cpp:726> 用户认证OK。 x2go-DEBUG-../src/sshmasterconnection.cpp:1789> 登录检查:“登录正常 " x2go-DEBUG-../src/sshmasterconnection.cpp:1792> 没有 交互 x2go-DEBUG-../src/sshmasterconnection.cpp:1825> LOOP 已完成 x2go-DEBUG-../src/sshmasterconnection.cpp:1829> 否 需要互动,继续会话 x2go-DEBUG-../src/sshmasterconnection.cpp:735> 登录检查 - 确定 x2go-DEBUG-../src/onmainwindow.cpp:2923> SSH 连接已建立。 x2go-DEBUG-../src/onmainwindow.cpp:3336> 继续正常的 X2Go 会话 x2go-DEBUG-../src/sshprocess.cpp:199> 通过执行远程命令 SshProcess 对象 0:“x2golistsessions” x2go-DEBUG-../src/sshprocess.cpp:213> this=SshProcess(0x5610224a1f30) 运行 masterCon->addChannelConnection(this, ' "1d4dfc1a-7f4d-4f00-b39e-07273d3d973d" ', ' "bash -l -c '回声 "X2GODATABEGIN:1d4dfc1a-7f4d-4f00-b39e-07273d3d973d";出口 PATH="/usr/local/bin:/usr/bin:/bin";export TERM="dumb"; x2golistsessions;回声“X2GODATAEND:1d4dfc1a-7f4d-4f00-b39e-07273d” '); x2go-DEBUG-../src/sshmasterconnection.cpp:1891> 锁定 SSH 通道连接MUTEX。 x2go-DEBUG-../src/sshmasterconnection.cpp:1893> 传递新通道 到 channelConnections 的连接对象。 x2go-DEBUG-../src/sshmasterconnection.cpp:1895> 解锁 SSH 通道 连接互斥体。 x2go-DEBUG-../src/sshmasterconnection.cpp:2083> 创建新频道。

x2go-DEBUG-../src/sshmasterconnection.cpp:2100> 新 频道:0x7fcf84012aa0

x2go-DEBUG-../src/sshmasterconnection.cpp:2185> 远程执行: “bash -l -c '回声 "X2GODATABEGIN:1d4dfc1a-7f4d-4f00-b39e-07273d3d973d";出口 PATH="/usr/local/bin:/usr/bin:/bin";export TERM="dumb"; x2golistsessions;回声 "X2GODATAEND:1d4dfc1a-7f4d-4f00-b39e-07273d3d973d";'"

x2go-DEBUG-../src/sshmasterconnection.cpp:2208> 新的执行通道 已创建。

x2go-DEBUG-../src/sshmasterconnection.cpp:2257> 通道上的 EOF 0x7fcf84012aa0; SSHProcess 对象:0 x2go-DEBUG-../src/sshmasterconnection.cpp:2380> EOF 已发送。 x2go-DEBUG-../src/sshmasterconnection.cpp:2384> 通道关闭。 x2go-DEBUG-../src/sshprocess.cpp:526> SSH 完成:原始输出 (stdout): "" x2go-DEBUG-../src/sshprocess.cpp:532> 只有标准错误, 一定有什么问题。 x2go-DEBUG-../src/sshprocess.cpp:537> SSH 完成:假-“bash:bash:找不到命令”(0)。 x2go-DEBUG-../src/onmainwindow.cpp:3804>“bash:bash:命令不 找到了

如果有人感兴趣,我可以显示服务器端/var/log/syslog

感谢您的帮助

【问题讨论】:

    标签: ssh ubuntu-18.04


    【解决方案1】:

    请尝试将您的 .bashrc 移到一边,然后重试。

    【讨论】:

    • 好的,还有一些提示:让我们先排除 gnome。创建一个新会话,而不是选择 gnome,为会话类型选择“应用程序”。在最右边的测试字段中,输入服务器上 xterm 的路径(确保在那里安装 xterm)。如果这样有效,则 gnome 会话设置存在问题。您也可以尝试禁用“自动登录”,看看是否有任何改变。消息 bash: bash: command not found" 可能意味着 bash 不在您的路径中或未安装,请也检查一下。
    • 我选择了应用程序,但我选择了 firefox 而不是 xterm(我的朋友就是这样工作的),但它没有用。也试过禁用自动登录,没用。而且我在两台计算机上都正常使用 bash,所以我不知道我是如何安装 bash 的。如何检查它是否在类路径上?
    【解决方案2】:

    这是我的错,愚蠢的我。我在 /etc/environment 文件中有一个错字,但我没有注意到它,因为在那个错字之后我没有重新启动我的电脑。修复后,它工作了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-15
      • 1970-01-01
      • 1970-01-01
      • 2015-04-25
      • 2022-01-24
      相关资源
      最近更新 更多