Linux Remote Control Method Overview (1)
There are several methods:
1. rlogin, RSH, and other R-series commands. Because of the large security risks, it is basically not used up now. So I will not introduce it in detail here.
2. Telnet. Telnet in Linux
And
It can be used in windows. You only need to open the corresponding service. Telnet
All the data is transmitted in plain text on the network, so there are also security risks. In the actual production system, it is basically not used, but switched to a safer ssh. However, in some scenarios, such as internal LAN
Network, telnet is useful. How to Use telnet: for example, to connect to the host foobar
Telnet foobar
You can also directly use the IP Address:
Telnet IP-of-foobar
Enter the user name and password, and connect to foobar.
3. Ssh. SSH is similar to telnet, but data is encrypted on the network before transmission.
Http: // www.linuxaid.com.cn/engineer/brimmer/html/ssh.htm
The article on this link is comprehensive and better than I wrote :)
4. remote X. This utilizes the network transparency of the X Window System, that is, the running and display of graphics programs can be on different hosts. Here, we need to clarify two concepts:
Server and X client. Assume that the xclock program runs on host a but is displayed on host B, who is X Server and X Server
What about the client? A is X server, B is X client? Error! The correct answer is that the application xclock is X client, and the host B is X
Server. Why? Server is the party that provides "resources", while client is the party that uses "resources. For the window system, "resource" is to display resources and input devices,
Such as display, keyboard, and mouse. Host B provides these resources, and the application xclock requests to use these resources. Therefore, xclock is the X client, and host B is the X
Server (more specifically, it should be on host B
An application, such as/usr/x11r6/bin/X, controls the allocation and management of these hardware resources on B ). Clarified the X client and X
After the concept of server, let's look at an important environment variable:
Display, which specifies a display device. All graphics programs will display themselves to this device. Display format
Hostname: displaynumber. screennumber. Hostname is a host name or its IP address. To understand
Displaynumber and screennumber, we need to know that on some machines, multiple display devices may share the same set of input devices, such as connecting on a PC.
The two CRT monitors share only one keyboard and one mouse. This group of display devices has a common displaynumber, and each of these display devices has a separate
The slave node has its own screennumber. Displaynumber and screennumber are both numbers starting from scratch. In this way
Displaynumber and screennumber are both 0.
Hostname can be omitted (but the colon following it cannot be omitted). If omitted, use the local machine as the default hostname, that is, M. N is equivalent
Localhost: M. N. Now we have mastered all the necessary knowledge for using remote X. If we want to run the gimp program on remote host a, but output its display
If the screen of host B is good for me, perform the following steps in sequence:
1). Start an X server program on B
2). Set the appropriate DISPLAY variable on a, for example, exp
ORT display = B: 0.0
3). Start gimp on.
PS:
1 ). if you cannot use the physical console of A, for example, the physical distance between A and B is very far away, you can use Telnet, ssh, and other methods to remotely log on to a for steps 2 and 3, there is no difference.
2 ). note: Because gimp is displayed on B, or it uses X server on B, A does not need to run an X server, it does not even have to be installed.
3). Note that B is not required to use Linux or UNIX.
Operating System
,
You only need to run an X server on it. The X server used in Linux is generally xfree86, which is a free open-source X
Server. Microsoft Windows also has available X servers, such as X-Win32 and Hummingbird Exceed, but they are mostly commercial software.
You may have noticed a problem. As mentioned above, it seems that an x graphics program can be displayed on any X server in the network, which will inevitably cause confusion. So, X
The window system provides the permission control command xhost to control which machines can use this X
Server. Xhost is easy to use. If you allow the host Foo to use my X server, you can use "xhost + foo". If you do not allow the host Foo
With this X server, you can use "xhost-foo"; if any host is allowed to use this X server, the simple "xhost"
+ "You can; otherwise," xhost-"will prohibit any host from using my X server. For more information, see xhost (1 ).
4. VNC (Virtual Network
Computing ). VNC is also a C/S architecture, but it is worth noting that if you open a VNC Server in session A, then VNC
Session A is also used when the client connects up. In other words, VNC does not start a new session. The most direct result is that if you enable VNC in an X session
Server, then you will find that your actions on the local machine (such as moving the mouse, opening a window, and so on) will be faithfully reflected in the VNC client, and the same, if
Move the mouse in the client, and you will find that the mouse on the local screen will also move accordingly.
The VNC server program in Linux is called vncs.
Erver, the client program is called vncviewer. Start server first:
[Leona @ Ash] $ vncserver
You will require a password
To access
Your has tops.
Password:
Verify:
New 'ash: 1 (Leona) 'desktop is Ash: 1
Creating default startup script/home/Leona/. VNC/xstartup
Starting applications specified in/home/Leona/. VNC/xstartup
Log File is/home/Leona/. VNC/ash: 2.log
The vncserver will tell you a identifier, that is
New 'ash: 1 (Leona) 'desktop is Ash: 1
This
"ASH: 1" in a row, "ash" is the host name of the host running vncserver, and it is no problem to change to the corresponding IP address. "1" can be considered as the started vncserver
Is actually the displaynumber of X Window (multiple vncservers can be started at the same time ). If this is the first time
Vncserver, which requires you to set a password. The VNC client must provide
This password. This password can be modified using the vncpasswd command in the future. After the server is successfully started, you can use VNC
Client. The identifier of the target server must be provided during connection, that is, the preceding "ASH: 1 ":
[Leona @ Ash] $ vncviewer ASH: 1
Then the password is provided and the session is started.
To disable a vncserver, run the vncserver-kill: id command. The ID here is the vncserver serial number.
In Windows, there are also VNC Server and VNC client (see the attachment ). During installation, you can set the VNC Server
Register as a system service. His usage is similar to that in Linux. I will not go into details here. Note that in windows, VNC
The field of the server's flag serial number is 0 and will not be another value.
5. rdesktop. This is a tool kit in Linux. It can connect to Microsoft Windows NT, Windows 2000
Terminal Services and Remote Desktop Services of Windows XP
Desktop ). It is easy to use. Here we connect to Windows
The remote desktop service of XP is used as an example. First, enable the remote desktop service under XP (note that XP's homeedition does not have the remote desktop service): Right-click my computer, select properties, and view "far
On the "computer" tab, select "allow users to remotely connect to this computer", and click "OK. Now run rdesktop on Linux machine
Hostname (before that, make sure that the X Window System has been started), where hostname is
The host name or IP address of the Windows server. Now you can log on to the Windows server.
Linux Remote Control Method Overview (2)
The VNC server program in Linux is called vncs.
Erver, the client program is called vncviewer. Start server first:
[Leona @ Ash] $ vncserver
You will require a password
To access
Your has tops.
Password:
Verify:
New 'ash: 1 (Leona) 'desktop is Ash: 1
Creating default startup script/home/Leona/. VNC/xstartup
Starting applications specified in/home/Leona/. VNC/xstartup
Log File is/home/Leona/. VNC/ash: 2.log
The vncserver will tell you a identifier, that is
New 'ash: 1 (Leona) 'desktop is Ash: 1
This
"ASH: 1" in a row, "ash" is the host name of the host running vncserver, and it is no problem to change to the corresponding IP address. "1" can be considered as the started vncserver
Is actually the displaynumber of X Window (multiple vncservers can be started at the same time ). If this is the first time
Vncserver, which requires you to set a password. The VNC client must provide
This password. This password can be modified using the vncpasswd command in the future. After the server is successfully started, you can use VNC
Client. The identifier of the target server must be provided during connection, that is, the preceding "ASH: 1 ":
[Leona @ Ash] $ vncviewer ASH: 1
Then the password is provided and the session is started.
To disable a vncserver, run the vncserver-kill: id command. The ID here is the vncserver serial number.
In Windows, there are also VNC Server and VNC client (see the attachment ). During installation, you can set the VNC Server
Register as a system service. His usage is similar to that in Linux. I will not go into details here. Note that in windows, VNC
The field of the server's flag serial number is 0 and will not be another value.
5. rdesktop. This is a tool kit in Linux. It can connect to Microsoft Windows NT, Windows 2000
Terminal Services and Remote Desktop Services of Windows XP
Desktop ). It is easy to use. Here we connect to Windows
The remote desktop service of XP is used as an example. First, enable the remote desktop service under XP (note that XP's homeedition does not have the remote desktop service): Right-click my computer, select properties, and view "far
On the "computer" tab, select "allow users to remotely connect to this computer", and click "OK. Now run rdesktop on Linux machine
Hostname (before that, make sure that the X Window System has been started), where hostname is
The host name or IP address of the Windows server. Now you can log on to the Windows server.