As a server-level operating system, Linux takes full account of remote login issues, whether it is convenient to log on to Linux from Linux, Windows, or some other operating system. This article describes how to use Linux and Windows to log on to a remote Linux server.
1. The Linux system logs on to the remote Linux server:
There are a number of different protocols to choose from, perhaps ssh is "best". SSH is the shorthand for secure shell, meaning "safe shell". As a replacement for Rlogin, RCP, telnet, these ancient Telnet tools, ssh authenticates the identity of the user and encrypts communication between the two hosts. SSH is designed with a variety of potential attacks in mind and provides effective protection measures.
The following describes the use of SSH from Linux to log on to another Linux server.
(1) First of all, install the OpenSSH first. Use the following command to automatically install Openssh:sudo apt-get installed SSH.
(2) Second, with a remote server user account, the author server This side created an server user, and its password is set to server, by modifying the/etc/sudoers configuration file so that it has a temporary root permission. Such as:
(3) below, you can log on to the remote Linux server by this command: SSH-L login_name hostname. Here Login-name refers to the user account, hostname refers to the server hostname or IP address. The server IP address can be viewed through system settings-network in the upper-right corner, with the server's IP address 192.168.43.80.
Log in to the Linux server:
This allows you to log on to the 192.168.43.80 host. When logged in, SSH will ask the user to log in to the server user's password, here I use a key pair login, SSH will not ask password, directly
Log in directly by checking the matching of key pairs. When you first log on, SSH may prompt for the authenticity of the key and ask if you want to continue the connection and answer yes to continue.
After logging on to the server host, you can do what you want to do, and after the work is done, use the exit command to end the SSH connection to the remote host.
SSH server is on port 22nd by default, if the server-side SSH service is not on port 22, you can specify the port to connect to by using the-p option of SSH.
Example: Ssh-l server-p 202 192.168.43.80# with 202 port connection.
(4) If you need to run an X application on a remote host, first ensure that the server has the X Window System turned on, and then use the SSH command with the-x parameter to display the start X forwarding function.
Example: Ssh-x-L Server 192.168.43.80
Firefox
After logging in, executing the FIREFOX,SSH will transfer the Firefox interface on the server to the full local. If the distance between the two hosts is long, or the network is not ideal, then the transmission of an X application will be slower, but should eventually be able to appear on the local screen. There are no pictures posted, because the same as on their own host to open the Firefox program, but on the server Firefox, if this time on the server to open Firefox, the server will show that Firefox is open, or busy.
(5) Log in with X Window directly: VNC is used here. The server is required to run an X Window System, and the related services and ports are turned on. Before connecting, the VNC configuration file is now generated in the directory of the remote host. Use the following command in turn:
Ssh-l Server 192.168.43.80
Vncserver# This procedure requires the user to set the remote access password
I was not in the setup, awkward.
After the setup is done directly at the terminal: Vncviewer ip-address:1 (Desktop number) command, you can log in the X window.
2. telnet to Linux from Windows
(1) There are several different SSH clients on Windows, where open source putty is the most widely used, download putty. Run.
Enter the IP and port number, then click Open to make the connection.
The first connection will appear as above dialog box, click Yes.
After the connection is logged in as follows:
The WINODWS can also be connected graphically via VNC and can be downloaded and installed by the reader itself.
Linux, Windows logon to a remote Linux server