Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Summary of linux remote Control method

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "summary of linux remote control methods". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Methods:

R series commands such as 1.rlogin, rsh, etc. Because of the greater security risks, it is now basically abandoned. So I won't give a detailed introduction here.

2.telnet . Telnet is available under both linux and windows, as long as you open the appropriate service. All the data of telnet is transmitted in clear text on the network, so there are security risks, and it is basically abandoned in the actual production system, and switched to a more secure ssh. But on some occasions, such as the internal local area network, telnet still has the opportunity to use its talents. How to use telnet: for example, you want to connect to the host foobar

Telnet foobar

You can also use ip directly:

Telnet ip-of-foobar

After entering the user name and password, it is connected to the foobar

3.ssh . Ssh is similar to telnet, but the data is encrypted and then transmitted on the network.

Http: / / www.linuxaid.com.cn/engineer/brimmer/html/ssh.htm

The article on this link is very comprehensive and better than what I wrote:)

4. Remote X. This takes advantage of the network transparency of the X Window window system, that is, graphics programs can be run and displayed on different hosts. First of all, I would like to clarify two concepts, X Server and X Client. Suppose the xclock program runs on host A, but appears on host B, who is X Server and who is X Client? An is X Server,B is X Client? Wrong! The correct answer is that the application xclock is X Client and host B is X Server. Why? Server is the one who provides the resources, while Client is the one who uses the resources. For window systems, "resources" are display resources and input devices, such as monitors, keyboards, mice, and so on. Host B provides these resources, and the application xclock requests to use these resources, so xclock is X Client and Host B is X Server (more specifically, it should be an application on host B, such as / usr/X11R6/bin/X, which controls the allocation and management of these hardware resources on B). After figuring out the concepts of X Client and X Server, let's take a look at an important environment variable: DISPLAY, which specifies a display device to which all graphics programs will display themselves. The format of DISPLAY is: hostname:displaynumber.screennumber. Hostname is a hostname, or its ip address. In order to understand the following displaynumber and screennumber, we need to know that on some machines, multiple display devices may share the same input device, such as connecting two CRT monitors to a PC, but they only share one keyboard and one mouse. This group of display devices has a common displaynumber, and each individual device in this group of display devices has its own separate screennumber. Both displaynumber and screennumber are zero-based numbers. In this way, for us ordinary users, displaynumber and screennumber are all 0. Hostname can be omitted (but the colon after it cannot be omitted), and if omitted, the native is used as the default hostname, that is, M.N is equivalent to localhost:m.n. Now that we have all the necessary knowledge of using remote X, if we want to run the gimp program on remote host A, but output its display to the screen of local host B for me to operate, we need to perform the following steps in turn:

1)。 Start an X Server program on B

2)。 Set the appropriate DISPLAY variable on A, for example: export DISPLAY=B:0.0

3)。 Start gimp on A

PS:

1)。 If you cannot use the physical console of A, for example, the physical distance between An and B is very far away, you can log in to A remotely using telnet, ssh and other methods to perform steps 2 and 3 without any difference.

2)。 Note that because gimp is displayed on B, or it uses X Server on B, there is no need to run an X Server on A, or even install it at all.

3)。 Note that B is not required to use the Linux or UNIX operating system, just run an X Server on it. The X Server used under Linux is generally XFree86, which is a free open source X Server. There are also X Server available under Microsoft windows, such as XmurWin32, Hummingbird Exceed, etc., but most of them are commercial software.

You may have noticed a problem that, as mentioned earlier, it seems that an X graphics program can be displayed on any X Server on the network, which is bound to cause confusion. Therefore, the X Window system provides the permission control command xhost, which can control which machines can use my X Server. The use of xhost is very simple. If you allow the host foo to use my X Server, you can use "xhost + foo"; if you do not allow the host foo to use my X Server, you can use "xhost-foo"; if you allow any host to use my X Server, simply "xhost +"; otherwise, "xhost -" will prohibit any host from using my X Server. For further use, please refer to xhost (1).

4.vnc (Virtual Network Computing). VNC is also part of the C vnc server S architecture, but there is one special thing to note. If you open a vnc server in session A, then session A will also be used when vnc client connects, in other words, vnc will not open a new session. The most direct consequence of this is that if you open vnc server in an X session, you will find that your actions on the local computer (such as moving the mouse, opening a new window, etc.) will be truthfully reflected in the vnc client, and similarly, if you move the mouse in the vnc client, you will find that the mouse on the local screen will move accordingly.

The vncserver program under linux is called vncserver,client program, which is called vncviewer. Start server first:

[leona@Ash] $vncserver

You will require a password to access your desktops.

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

Vncserver will tell you a marker, that is,

New 'Ash:1 (leona)' desktop is Ash:1

The "Ash:1" and "Ash" in this line is the hostname of the host running vncserver, and there is no problem changing to the corresponding ip address; "1" can be thought of as the sequence number of the booted vncserver (actually the displaynumber of X Window) (multiple vncserver can be started at the same time). If you start vncserver for the first time, it will ask you to set a password that vnc client must provide when connecting to the server. This password can be changed in the future using the vncpasswd command. After server starts successfully, you can use vnc client to connect. When connecting, you must provide the marker of the target server, that is, the "Ash:1" mentioned earlier:

[leona@Ash] $vncviewer Ash:1

Then the password is provided and the conversation is entered.

If you want to close a vncserver, you can use the command vncserver-kill: id, where id is the serial number of the vncserver.

Vnc server and vnc client are also available under windows (see annex). Vnc server can be registered as a system service at installation time. His use is similar to that under linux, so I won't repeat it here. It's just one thing to note that the flag serial number field of vnc server under windows is 0 and will not be any other value.

5.rdesktop . This is a toolkit under linux that connects Microsoft Windows NT, Windows 2000 Terminal Services (Terminal Services), and Windows XP remote Desktop Services (Remote Desktop). It's easy to use, and here's an example of a remote desktop service that connects to Windows XP. First, enable the remote desktop service under XP (note that XP's HomeEdition does not have a remote desktop service): right-click on my computer, select Properties, view the "remote" tab page, check "allow users to connect to this computer remotely", and then click "OK" all the way. Now execute rdesktop hostname on the linux machine (before that, make sure that the X Window window system is started), where hostname is the hostname or ip address of the windows machine. Now you can log in and use the windows machine.

This is the end of the summary of linux remote control methods. Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report