use*_*630 21 remote-desktop remote-access xrdp
我有一个 Ubuntu 虚拟机,我需要对其进行远程桌面。我没有对那台机器的物理访问权限,我只能对这台机器执行 ssh。我想做远程桌面并想出了很多选项(vnc、xrdp、opennx)。我使用了 xrdp 并在 ubuntu 机器(xrdp 和依赖)中安装了必要的包。然后我使用以下命令行选项在 ubuntu 中启用了远程访问。
gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true
gconftool-2 -s -t bool /desktop/gnome/remote_access/prompt_enabled false
Run Code Online (Sandbox Code Playgroud)
然后我重新启动了 xrdp(/etc/init.d/xrdp start)。但是当我尝试使用 Windows 客户端 (mstsc) 执行 rdp 时,出现以下错误。未启用对服务器的远程访问。
我该如何解决这个问题?请帮忙。
拉吉
Key*_*0de 24
在文件 /etc/xrdp/xrdp.ini 上添加 address=0.0.0.0,这是默认的 xrdp 地址。
此外,您必须允许防火墙侦听 xrdp 正在处理的端口 3389 上的连接。对于这个执行:
sudo ufw allow 3389
Run Code Online (Sandbox Code Playgroud)
如果这也不起作用:
sudo ufw disable
服务器 pc 上的防火墙 ( ),然后重新检查(甚至可能需要重新启动)。如果你错过了它,我将在下面列出整个过程(组装起来很痛苦)。如果你一步一步来,你会没事的(承诺!)。
我。Windows 到/从 Windows:
使用 Windows 远程桌面软件
二。Linux / Unix 到 / 从任何地方
首先在您将通过远程桌面连接的服务器计算机上执行以下操作:
- Allow other users to view your desktop
- Best to require a password
- service ssh status
- To allow computers to connect with X11 graphics system capabilities as well, you need to
install an X11 server on the computer that is trying to connect (client). So
* for a Windows computer use XMing
* for a Linux Ubuntu computer use XQuartz
Run Code Online (Sandbox Code Playgroud)
Ⅱa。从具有图形支持的终端从 Windows 到 Linux
- Launch XMing on Windows client
- Launch Putty
* Fill in basic options
* Connection -> SSH -> X11
-> Enable X11 forwarding
-> X display location = :0.0
-> MIT-Magic-Cookie-1
-> X authority file for local display = point to the Xming.exe executable
Run Code Online (Sandbox Code Playgroud)
Ⅱb。(b 更好)具有完整 GUI 支持的 Windows 到 Linux。这是你们大多数人想要的。
- install xrdp which uses the remote desktop protocol to present a GUI to the user.
It can provide a fully functional Linux terminal server, capable of accepting connections
from rdesktop, freerdp, and Microsoft's own terminal server / remote desktop clients.
xrdp is the daemon that handles RDP remote desktop access from Windows machines to Linux
- edit the "/etc/xrdp/xrdp.ini" file to include the line:
address=0.0.0.0
right under #background=626x72 line. 0.0.0.0 is the local server address of xrdp
- Restart xrdp service
- allow xrdp port (probably 3389) through firewall
- We also need a VNC server. Install tightvncserver on Linux server machine.
- run tightvncserver (no need to create a view-only password)
- "netstat -lvp | grep vnc" to check out the ports that tightvnc is listening on for
connections
- allow the vncserver port from the firewall: sudo ufw allow #
- allow the xrdp server
- Install xfce4 desktop environment an update to xfce, minimalistic faster and lightweight
sudo apt-get install xfce4
- sudo apt-get install xfce4-terminal : way better than xterm
- sudo apt-get install gnome-icon-theme-full tango-icon-theme : installs icon sets
- Now we modify 2 files to make sure xrdp uses xfce4
* echo xfce4-session >~/.xsession
* secondly we modify startup file for xRDP located at /etc/xrdp/startwm.sh
so it will start xfce4. Replace the last line with
startxfce4
(before it had something which started with a ., but no matter whatever it is, just
replace the last line)
* restart xrdp service: sudo service xrdp restart
- Now you are ready to log into the computer from client using Remote Desktop (mstsc.exe).
Just supply the ipv4 or hostname of the VNC server.
Run Code Online (Sandbox Code Playgroud)
三. *nix 到/来自 *nix
- ssh -X [preferedUserName]@[targetIpv4Address] : -X flag enales X11 forwarding
- accept security certificates from trusted hosts when prompted
Run Code Online (Sandbox Code Playgroud)
四. 确保连接安全(可选步骤 - 适用于任何配置)
VNC 和 xrdp 协议不安全,这意味着它们没有加密。
要确保连接安全,请编辑 /etc/xrdp/xrdp.ini 文件,使地址变为 127.0.0.1。这将是 ssh 服务器的本地主机地址。下面将使用 SSH 加密来隧道传输 vnc 流量。
- sudo service xrdp restart
- sudo service ssh restart
- pkill Xtightvnc
- tightvncserver
- putty -> Connection -> SSH -> Tunnels
* Source port: 5555
* Destination: localhost:3389
Run Code Online (Sandbox Code Playgroud)
如果上述方法不起作用:
sudo ufw disable
服务器 pc 上的防火墙 ( ),然后重新检查(甚至可能需要重新启动)。来源和信用:
小智 8
我特别不熟悉 xrdp,但我要检查的第一件事是查看它使用的端口是否 a) 侦听连接和 b) 向外界开放。RDP 的默认端口是3389。
第一个很容易检查;只需在您尝试连接的机器上的终端中运行它(如果 xrdp 正在侦听不同的端口,则更改 3389):
netstat -an | grep "LISTEN " | grep ":3389"
Run Code Online (Sandbox Code Playgroud)
如果您得到类似以下内容,则至少(希望 xrdp)正在侦听连接:
tcp 0 0 127.0.1.1:3389 0.0.0.0:* LISTEN
Run Code Online (Sandbox Code Playgroud)
如果您没有得到任何输出,请尝试(重新)启动 xrdp 或检查以确保您拥有正确的端口。
接下来,您需要确保机器可以通过该端口访问 Internet,这涉及两件事:确保机器本身的防火墙没有阻止与该端口的连接,并确保任何网络设备(即路由器)在您尝试连接的计算机和 Internet 之间不会阻止连接。PortForward.com可以为后者提供帮助;第一个取决于您的计算机上安装了哪种防火墙(如果有)。
希望这可以帮助!
小智 5
我终于得到了这个为我工作;设置:运行 ubuntu 13.10 的旧笔记本电脑运行标准统一;我已经安装了 cairo Dock(这使它对我更有用);仍然不习惯左侧的应用栏;
能够使用我的 win7 系统 rdp 进入这个 ubuntu 13.10 会很好,所以我今天早上花了几个小时做研究。这是我所做的:
sudo apt-get update
sudo apt-get install xrdp
Run Code Online (Sandbox Code Playgroud)
或者您可以使用 ubuntu 软件中心进行安装。
安装似乎没问题,而且 xrdp 服务似乎启动正常。
从我的win7盒子里,我打开了一个rdp窗口,用笔记本的IP地址进去;一个窗口确实打开了,但只是一个标准的 x11 窗口屏幕(带有 x 光标的交叉影线图案);没有可使用的链接、图标或菜单。
更多谷歌研究。我安装了 gnome-session-fallback:
$ sudo apt-get install gnome-session-fallback
$ echo "gnome-session --session=gnome-fallback" > ~/.xsession
Run Code Online (Sandbox Code Playgroud)
这没有用;我得到了相同的空白屏幕,但发现另一个 URL 建议另一个 Windows 会话管理器,如 XFCE,所以我安装了 xubuntu 桌面:
$ sudo apt-get install xubuntu-desktop
$ echo "xfce4-session" > ~/.xsession
Run Code Online (Sandbox Code Playgroud)
sudo /etc/init.d/xrdp restart
在所有更改之后不要忘记。
这奏效了。起初,在 rdp 会话的初始启动时,我得到了相同的空白屏幕,但 10 秒后(可能是因为我在远程位置使用 win7 VDI)弹出了一个可用的 xfce xubuntu 桌面;不如gnome好,但非常好用。
希望这些信息会有所帮助,因为我无法获得最初为我工作的尝试。
戴夫
欢迎来到 Ubuntu 社区。
首先检查 Virtual Box 中 Windows 虚拟机的网络设置。在网络设置中选择桥接。检查是否允许RDP通过Window客户端的防火墙。
归档时间: |
|
查看次数: |
339947 次 |
最近记录: |