Article Title: Remote Control Technology and practice for Linux servers. 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.
Concepts and origins of Linux Remote Control Technology
Remote control is a technology that remotely controls another computer (controlled Host/Server) on the network, remote control is generally used to control remote computers over the network. However, in most cases, remote control is usually used in the LAN.
When the operator uses the master computer to control the controlled computer, the application of the controlled computer can be started just like sitting on the screen of the controlled computer, you can use the file data of the controlled computer, or even use the external printing equipment (printer) and communication equipment (modem or leased line) of the controlled computer to print and access the internet, just like using the remote control to remotely control the TV's volume, change the channel, or switch the TV.
Currently, the remote connection technology mainly used in Linux is roughly divided into the following three types:
1. Command Line-based methods
Linux Command: telnet. telnet can be used in both linux and windows, as long as the corresponding service is enabled. All telnet data is transmitted in plain text on the network, so there are also security risks. In actual production systems, it is basically not used, but switched to a safer ssh. however, in some cases, such as the internal local area network, telnet is useful. Ssh is similar to telnet, but data is encrypted on the network before transmission.
Rlogin, rsh, and other r-series commands: because of the large security risks, it is basically useless now.
Ssh-based client software: client tools such as Secure SSH or PUTTY use the ssh service to manage Linux servers in Windows. These client tools are easy to configure and use, however, they cannot start the program or process of the window service or achieve Remote Desktop control.
Note: The command line management method is suitable for initialization, Nic configuration, and other basic operations. It is not suitable for a wide range of management functions.
2. Web Management
Web management is another management tool. This method provides a simple management interface, which is suitable for management tasks with fewer functions.
3. graphical interface based on Management Software
Graphical interfaces based on Management Software generally require system configuration, management, and monitoring. The graphic management method is intuitive and is an important management tool. It is suitable for complicated configuration, connecting multiple servers, and supporting a wide range of audit and log functions.
VNC: VNC (Virtual Network Computing, Virtual Network Computing) technology is widely used as a "productivity tool" for programmers and administrators ". Vnc must have a daemon on the server to run on each shared desktop. VNC is a client/server architecture.
X display manager (X display manager) -- xdm: Xdm no longer needs to add additional client software. X-Win32 is an X Window System server that allows your Windows system to run X applications or Unix systems over TCP/IP protocol. Supports OpenLook, Motif, CDE, VUE, TPD, Gnome, and other X applications running on Sun, HP, SGI, Linux, SCO, AIX, and other Unix workstations and file servers.
Freenx: NX is a remote display software based on the X protocol. However, to compress data of the X protocol, it is important to use the X protocol in a low-bandwidth network. Freenx is the GPL version of NX.
FreeNX is a new remote control solution after VNC in recent years. The basic principle is to compress XWindows signals and transmit them to remote clients for display. VNC directly captures screen images for processing and transmission. In this way, FreeNX can provide a better sense of operation and real-time performance than VNC under the same transmission channel conditions, because its implementation principle depends on XWindows, therefore, FreeNX currently does not support using Windows as the Remote Control Server.
1. FreeNX Server Installation
1. Download Software:
Download freenx, nx, CT, nc
2. Install software:
# Rpm-ivh nc-1.10-18 RPM for i386
# Rpm-I nx-1.4.0-0.fdr.4.i386.rpm
# Rpm-I expect-5.4.2.1-1.i386.rpm
# Rpm-I freenx-0.3.1-0.fdr.0.noarch.rpm
3. Configure nxserver
#/Usr/bin/nxsetup -- install
Setting up/etc/nxserver ...... Done
Setting up/var/lib/nxserver/db ...... Done
Setting up/var/log/nxserver. log ...... Done
Setting up known_hosts and authorized_keys2 ...... Done
Setting up permissions ...... Done
OK, nxserver is ready.
PAM authentication enabled:
All users will be able to login with their normal passwords.
PAM authentication will be done through SSH.
Please ensure that SSHD on localhost accepts password authentication.
You can change this behaviour in the/etc/nxserver/node. conf file.
Have Fun!
4. Add a user and password
# Nxserver -- adduser x1
NX> 100 NXSERVER-Version 1.4.0-44 OS (GPL)
NX> 1000 NXNODE-Version 1.4.0-44 OS (GPL)
NX & gt; 716 Public key added to:/home/x1/. ssh/authorized_keys2
NX & gt; 1001 Bye.
NX & gt; 999 Bye
[Root @ host tmp] # nxserver -- passwd x1
NX> 100 NXSERVER-Version 1.4.0-44 OS (GPL)
New password:
Password changed.
NX & gt; 999 Bye
Note: x1 users must already exist on the server.
5. Modify permissions
# Nxsetup -- install -- setup-nomachine-key
Chmod 666/dev/urandom
# Chmod 666/dev/null
# Chmod 640/var/lib/nxserver/home/. ssh/authorized_keys2
6. Start, view, and stop the nx command
# Nxserver -- start: start the NX Server
Nxserver -- stop: stop the NX Server
Nxserver -- status: View NX Server
Nxserver -- restart: restart NX Server
Nxserver -- help: View help information
If you are using the iptables firewall, you must open the corresponding Port:
# Iptables-a input-I lo-s 127.0.0.1-j ACCEPT
# Iptables-a input-p tcp -- dport 22-j ACCEPT
# Iptables-a output-p udp -- sport 22-j ACCEPT
# Iptables-a input-p tcp -- dport 5000-j ACCEPT
# Iptables-a output-p udp -- sport 5000-j ACCEPT
Note: The NxFree server relies entirely on SSH for work. Therefore, ensure that the Openssh configuration of the Linux server is correct.
[1] [2] Next page