Login Remote Linux in Windows System

Remote Host: Fedora 3
Localhost: Windows XP

Using OpenSSH+Xming to Log in Remote Linux

A. Ensure openssh have been installed in the remote host, using this command to query:

rpm -qa | grep openssh

However, openssh has been installed automatically when you install the linux system. If there's nothing displayed after this command. you could install these packages begin with openssh from the installation media, or you could use yum to install:

yum install openssh-*

Edit /etc/X11/fs/config, add symbol "#" to the beginning of the line of "no-listen = tcp" to use remote font server.

B. Install OpenSSH for windows, and generate the key-pair so that you can log in to the remote host using ssh.

Run command ssh-keygen to generate the key-pair. please use a complex password to keep your system safe.

Copy the public key to the home folder of the remote host as ~/.ssh/authorized_keys

C. Configure the SELinux on the remote host to ensure ssh be a credible method to connect.

D. Download Xming to localhost and install it.

  1. Double-click the XLaunch on the Desktop, choose "Multiple windows", and click "next step",
  2. in the "Session type" panel, choose "Start a program", go to next step,
  3. in the subpanel "Run Remote", choose "Using ssh(ssh.exe)", and enter the remote host name or ip address, and your username. then click "Next step",
  4. In the remote font server, please enter the remote host name or ip address, click "Next step",
  5. In the "Fnish Configuration" panel, you may save configuration, and click "Finish" to start "xterm".

Using  XDMCP+Xming to run Linux Program

(Because of safety, this method is not recommended.)

On Linux remote host, edit the /etc/X11/xdm/xdm-cofig, add the "!" to the line of "DisplayManager.requestPort: 0" just like !DisplayManager.requestPort: 0

Edit the /etc/X11/xdm/Xaccess, delete the "#" of the line of "# * # any host can get a login window" just like * # any host can get a login window

Edit file /etc/X11/gdm/gdm.conf, Find the line of "[xdmcp]", change Enable=false as Enable=true under it.

Edit file /etc/X11/xdm/Xservers, add "#" to the beginning of the line ":0 local /usr/X11R6/bin/X" under it.

Edit file /etc/X11/fs/config, add symbol "#" to the beginning of the line of "no-listen = tcp" to use remote font server.

Here, you should shutdown the firewall. then restart the system.

  1. On the local host, start XLaunch, choose not "Multiple windows" but others to use XDMCP
  2. in the next step, choose "Open session via XDMCP",
  3. in the next panel of "XDMCP settings", choose "Connect to host" and input your remote host name or ip address, or choose "Search for hosts (broadcast)" to find XDMCP server automatically,
  4. in the next panel of "Additional parameters", input your remote font server, here it's your remote host name or ip address.
  5. then, just as the ssh+Xming method to start X Window.

Now, enjoy it!

Using "nohup" to let program run on backstage

The style of command nohup will be like

nohup YOURCOMMAND Arguments &

Then you should enter "exit" to quit terminal, otherwise the program will not run on backstage

Also, you could use other X window emulator, such as Exceed, X-win32, Xmanager, and etc. but the remote host should be configured correctly as above. Moreover, if you cannot login remote Linux system, you could write a reply to me, or read to the references. 

References

1. 在 Windows 使用 Linux 桌面应用程式. http://cha.homeip.net/blog/archives/2007/08/_windows_linux.html

2. nohup命令让Linux程序永远在后台执行. http://www.5dmail.net/html/2007-12-23/20071223205334.htm

   Send article as PDF   

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.