N SPACE

Thinking,Technology&Life Recording...
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Xmanager远程连接Linux的配置

Posted on 2008-05-16 17:37  Huntercat  阅读(2256)  评论(0编辑  收藏  举报
 
Windows下通过xmanager远程桌面控制Linux
1>
目录
/usr/X11R6/lib/X11/xdm/Xaccess
or
/etc/X11/xdm/Xaccess
把这句的注释去掉:
* #any host can get a login window
目录
/etc/X11/xdm/xdm-config

#DisplayManager.requestPor前面+ ' ! '
! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm
!DisplayManager.requestPort: 0
2>
目录
/etc/X11/gdm/gdm.conf

[xdmcp]
# Distributions: Ship with this off. It is never a safe thing to leave
# out on the net. Setting up /etc/hosts.allow and /etc/hosts.deny to only
# allow local access is another alternative but not the safest.
# Firewalling port 177 is the safest if you wish to have xdmcp on.
# Read the manual for more notes on the security of XDMCP.
Enable=1 #
将其中的Enablefalse 改为Enabletrue Enable1
# The port. 177 is the standard port so better keep it that way
Port
=177

3>
目录
/etc/inittab
id:5:initdefault:
# Run xdm in runlevel 5 #
这个位置改为:
x:5:respawn:/usr/bin/gdm
4

确保
/etc/X11/xdm/Xservers
的属性为444
/etc/X11/xdm/Xsetup_0
的属性为755
5>
如果Linux机器配置有防火墙,为防止防火墙将通过177端口(即xdmcp服务)的数据过虑,我们必须加上如下的规则:
#> iptables -A INPUT -p udp -s 0/0 -d 0/0 --dport 177 -j ACCEPT


在安装目录下,我们点击xconfig,选择xdm,如下图,选择”XDM Indirect”,
host:后面填上我们已经配置好的Linux系统的ip,注意下面的XDMCP Port:177,
这就是我们在配置Linux服务器时必须保证 port177的原因。
然后我们双击xmanager安装目录里的xmanager,出现下面的画面,
选择图中的linux机器,然后点击连接即可以连接到我们的redhat登陆桌面了。


官方原版下载 http://download.xmanager.com/files/xmgr20.exe
序列号 SN:040101-110321-000320
官方中文字体下载: http://download.xmanager.com/files/fonts2/chinese.exe

XManager2.0远程连接Linux图形界面

服务器:Red Hat Linux
终端:Xmanager 2.0

使用方法:

服务器上操作:
------------------------
1.
修改 /etc/X11/xdm/Xaccess,将下面的行:
#* # any host can get a login window
改为:
* # any host can get a login window
------------------------
2.
修改/etc/X11/gdm/gdm.conf,找到下面的信息:
[xdmcp]
Enable=0
Enable=false
修改为:
[xdmcp]
Enable=1
Enable=true
并确保以下信息存在:
Port=177
------------------------
3:
修改/etc/inittab,将
id:3:initdefault:
修改为:
id:5:initdefault:
并将最后一行改为:
x:5:respawn:/usr/bin/gdm
-------------------------
4:
确保/etc/X11/xdm/Xservers的属性为444/etc/X11/xdm/Xsetup_0的属性为755
-------------------------
5:
重新启动机器

Xmanager2的配置
不使用图形界面也可以使用Xmanager2登陆进行图形控制
#vi /etc/X11/xdm/xdm-config
在最后一行: DisplayManager.requestPort: 0 前面加!号注释掉此行。
#vi /etc/X11/xdm/Xservers
在最后一行::0 local /usr/X11R6/bin/X 前面加#号注释掉这一行。
#vi /etc/X11/xdm/Xaccess
找到#* #any host can get a login window
把这一行前面的#号去掉,变成:
* #any host can get a login window
最后运行#xdm。这样使用xmanager等工具就可以连接Linux了!


如果使用sshwindows远程登录到linux
ssh 必须开了 X forwarding 的选项。
1.vi /etc/ssh/sshd_config
X11Forwarding 要为 yes
2.vi /etc/ssh/ssh_config
也是的 ForwardX11 yes