在文件/etc/xrdp/xrdp.ini上,添加地址= 0.0.0.0,这是默认的xrdp地址。
另外,您还必须允许防火墙侦听xrdp正在处理的端口3389上的连接。为此执行:
sudo ufw allow 3389
如果这也不起作用:
- 重新启动电脑
sudo ufw disable
在服务器PC上禁用防火墙(),然后重新检查(甚至可能需要重新启动)。
如果你错过了,我会在下面列出整个程序(这是一个痛苦组装)。如果您按照步骤进行操作,就可以了(诺言!)。
任何操作系统的分步指南之间的远程桌面
我。Windows到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
IIa。从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
IIb。(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.
三。* nix往返于* nix
- ssh -X [preferedUserName]@[targetIpv4Address] : -X flag enales X11 forwarding
- accept security certificates from trusted hosts when prompted
四。确保连接安全(可选步骤-适用于任何配置)
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
如果上述方法不起作用:
- 您可能需要重新启动两台计算机,
sudo ufw disable
在服务器PC上禁用防火墙(),然后重新检查(甚至可能需要重新启动)。
- 如果上述方法不起作用,则说明您已通过安装有冲突的软件包来弄乱系统。您必须对此进行手动故障排除(如果正确按照说明进行操作,则极不可能达到此步骤)。
来源和信誉: