Sharing computers on Linux (or heterogeneous) networks, part 1

Source: Internet
Author: User
Article title: sharing computers on Linux (or heterogeneous) networks, part 1. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Author: David Mertz
  
Comparison between "Secure shell (SSH)" and "Virtual Network Computing (VNC )"
  
In the first two articles, David compared and compared "Secure shell (SSH)" and "Virtual Network Computing (VNC )", these two technologies allow users to run applications on one workstation on another computer. (He does not involve file and print sharing or "internet" services such as httpd, ftpd, smtp, or nntpd, although these technologies can also effectively "share" some resources in the above computers .) However, he did provide tips for installing and configuring SSH and VNC, and commented on the stability, options, and license of the tool.
To effectively test various software programs and write articles about them, I have a large number of computers on my local network. These machines run various operating systems and use various hardware configurations. Sometimes I evaluate tools on various platforms, and sometimes I test and debug my own tools.
  
Most machines on my network have installed a variety of operating systems in the form of multi-boot configuration, but some are "headless" (no monitor or keyboard ). Although the multi-boot loader is suitable for multiple operating systems, the time overhead of re-boot takes more time for detailed comparison tests on multiple platforms due to testing on only one machine. Multiple guidance is not conducive to "side-by-side" comparison. I have never evaluated any tools that allow you to "virtualize" another system in one system, such as VMWare, Plex86, VirtualPC, SheepShaver, or other tools. In some ways, these tools implement the purpose of the tools I will discuss in this article.
  
There are several different technologies that allow users to run applications on another computer on one workstation. SSH is provided to text terminals on remote computers. you can use the "X Window system" to display interactive applications on some workstations, which actually run on another workstation; VNC can be used as "remote control" for the entire remote desktop ". Each technology has advantages and disadvantages. They all run on Linux, but different variants (host or remote) allow interaction with other OS environments (for heterogeneous networks. Using a combination of these tools, I can sit in front of a workstation (the one with the best monitor, keyboard, and Chair, run, test, and timing applications on multiple platforms (usually without restarting any system.
  
My network settings
I have seven nodes on my local network, named Apollo, Bacchus, Chaos, Delphi, Echo, Fury, and Gaia. These nodes are assigned IP addresses from 192.168.1.101 to 192.168.1.107. In most cases, a physical machine always obtains the same IP address when multiple boot attempts are made to different operating systems (but sometimes I use DHCP, which assigns addresses above 192.168.1.200 ). After the entire network is located in a hardware firewall/router, I fully trust the firewall. I may not be as skeptical about the services running on local machines as it should be. (Readers who need to share computers on the Internet should be more worried about security issues than I do. The second part of the two articles includes some discussions about security issues .)
  
I mentioned most of the above details so that you can follow some shell examples I have given below. My actual machine is Bacchus, and its local IP address is 192.168.1.102.
  
Secure shell (ssh)
The most bandwidth-saving method for connecting a computer is through a simple text shell. The non-security tools used to complete this operation are telnet and rsh. However, using these tools may cause many security problems. Therefore, it is best to install ssh on all computers that require communication. Although some examples below use telnet in my firewall, this compromise is also a product of the fact that "Fury" is currently dedicated to installing and reinstalling test operating systems. By default, ssh will be installed on many UNIX-like operating systems (including the latest Linux distribution version (distribution). if ssh is not installed, see references later in this article to install it.
  
Secure shell (ssh) encrypts all information flows through a specific channel. Because public-key encryption is used, the server and client do not need to share the key before the session starts (initiation. In addition, confidential information is not transmitted in unencrypted format in the channel (for example, any interceptor can intercept the password using telnet transmission ). Other protocols-such as VNC or X Window-can be located at the top of ssh, but these protocols are most useful for creating remote text consoles.
  
Using ssh, you can easily connect to a machine that runs a different operating system from a local machine. The only requirement is that the sshd server is run remotely, and the local machine must have an ssh client. For example, to connect a "Bacchus" machine running OS/2 Warp to a "Delphi" machine running Slackware Linux next door is as simple as the following list:
  
Connect to the remote machine through the HOSTS name through ssh C: \ UTILS % ssh quilty @ delphi
Last login: Thu Nov 29 01:41:36 2001 from 192.168.1.102
Linux 2.2.19.
Quilty @ delphi :~ $ Exit
Logout
Connection to delphi closed.
  
  
  
If no alias is defined for my HOSTS file, you can use:
  
Connect to remote machine C: \ UTILS % ssh quilty@192.168.1.104 via IP
Last login: Thu Nov 29 01:51:31 2001 from 192.168.1.102
Linux 2.2.19.
Quilty @ delphi :~ $
  
  
  
Similarly, I often manage my Web servers around the world by using the following commands:
  
Connect to the remote machine C: \ UTILS % ssh gnosis@gnosis.cx using the DNS name
Gnosis@gnosis.cx's password:
  
  
  
For ssh on heterogeneous platforms, the most difficult thing is to get the terminal configuration correctly. In fact, this is not a problem with ssh itself (telnet also has similar problems ). Connecting two Linux machines almost always works seamlessly. However, when the machines installed on other platforms are used as clients or servers, the display is always incorrect, or the key binding does not work as expected. When it comes to "non-UNIX-like" platforms such as Win32, BeOS, MacOS, and OS/2, the problem seems to be particularly serious, but even connecting FreeBSD to Linux has disadvantages.
  
When creating an ssh connection between heterogeneous machines, the most typical problem is a code page error or a color escape code error. In either case, the basic command line is available, but the line-draw character is displayed as something else. you can only see the monochrome terminal rather than the color. Shell commands are not affected by this impedance mismatch, but interactive curses or slang applications are usually affected. The most noteworthy among these applications is the text editor, which is usually the application that you need to run most on the remote console. By the way, jed is a particularly good remote text editor; its strong kernel may use vim. Most other Linux/UNIX editors are neither X-based nor extremely rough (or bloated, such as emacs ).
  
If you encounter terminal configuration problems, you need to do a few things. If a problem occurs when you connect to a UNIX sshd-like server, try to change the remote TERM environment variable. For example:
  
Quilty @ delphi :~ $ TERM = vt100
Quilty @ delphi :~ $ TERM = ansi
Quilty @ delphi :~ $ TERM = linux
  
  
  
At the same time, the local ssh client usually has a way to configure the connection terminal type. It may be a command line option, environment variable, or menu dialog box, depending on the platform and client program. You should not use the same name at both ends of the connection. Tests should be performed repeatedly. Check to ensure that "no code page conversion" is used in the client configuration ". To test impedance match, try to run a full-screen remote application (such as jed or another editor ).
  
Virtual Network Computing (VNC ))
VNC is a client/server system that has been transplanted to many GUI platforms. VNC provides a lightweight protocol for displaying the entire desktop of a remote computer on a local system. Symantec's pcAnywhere is a commercial product for a similar purpose, but it is limited to Microsoft operating systems. On the contrary, VNC can run on many different operating systems, and has multiple implementations and variants.
  
A good way to get a perceptual knowledge of VNC is to view the screenshots on its website (see references ). The possible combination is much larger than the one shown here, but multiple variations show the majority. Generally, any platform with a VNC client (usually known as vncviewer) can display any virtual desktop with a VNC server (vncviewer) in a local window. Resizing and full screen options may be available, depending on the VNC client version.
  
There is a slight difference between the X-based version (Xvnc) of the VNC server and the version used for other platforms. Single-user systems such as Windows, MacOS, BeOS, and OS/2 do not have the "desktop session" concept of "X Window System. Therefore, for example, the Windows VNC server only displays the remote version of the same Windows desktop as the local system. when connected, this is called "desktop: 0 ". On the contrary, X Window is multi-user and multi-session. Each Xvnc session creates a brand new desktop that may have its own resolution, window manager, and status. In other words, X provides much better support for VNC.
  
Once the VNC server is installed, the startup session is simple and easy to install. For more information, see references. For a single-user platform, because basically only applications are running, there is no option (you will need to set some permissions for the first time ). In X, some command line options are helpful. For example, I have connected to a telnet session from the local OS/2 Warp "Bacchus" machine to the "Fury" machine of the Mandrake Linux, as shown below:
  
Start a VNC server session on Fury [root @ fury quilty] # cat/usr/bin/vnc-sessions
Vncserver-name TinyLinux-depth 8-geometry 640x480
Vncserver-name BigLinux-depth 32-geometry 1260x940
[Root @ fury quilty] # vnc-sessions
  
New 'tinylinux 'desktop is fury. gnosis. lan: 1
  
Starting applications specified in/root/. vnc/xstartup
Log file is/root/. vnc/fury. gnosis. lan: 1.log
  
  
New 'biglinux 'desktop is fury. gnosis. lan: 2
  
Starting applications specified in/root/. vnc/xstartup
Log file is/root/. vnc/fury. gnosis. lan: 2.log
  
  
  
Now, I can use the local vncviewer from the client to connect to Fury: 1 or Fury: 2 (or connect both ).
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.