Linux Telnet | Beginner's Tutorial

Source: Internet
Author: User
Tags ssh secure shell

LinuxTelnet

Linux is generally used as a server, and the server is generally placed in the room, you can not operate in the computer room of your Linux server.

We need to telnet to the Linux server to manage the maintenance system.

The Linux system is a telnet function via the SSH service, and the default SSH service port number is 22.

The Linux Telnet Client on window System has SECURECRT, Putty, SSH Secure shell and so on, this article takes Putty as an example to log on to the remote server.

putty:http://www.putty.org/

If you downloaded the Putty, double-click Putty.exe and then pop up the following window.

In the box below the host Name (or IP address), enter the IP of the remote server you want to log in to (you can view the server IP through the ifconfig command), and then enter.

At this point, we are prompted to enter the user name to log in.

Enter root and enter the password, then you can log in to the remote Linux system.

Telnet to Linux using the key authentication mechanism

SSH is the abbreviation for Secure Shell, which is developed by the network Working group of the IETF.

SSH is a security protocol based on the application layer and the transport layer.

First use the tool PUTTYGEN. EXE to generate a key pair. Open the tool PUTTYGEN.EXE as shown below:

The tool can generate three forms of Key:ssh-1 (RSA) SSH-2 (RSA) SSH-2 (DSA), which we use in the default format, SSH-2 (RSA). Number of bits in a generated key this refers to the size of the generated key, the larger the value, the more complex the generated key is, and the higher the security. Here we write 2048.

Then click Generate to start generating the key pair:

Note that in this process the mouse moves back and forth, otherwise the progress bar will not move.

Here, the key pair has been generated. You can enter a password for your key, or you can leave it blank (at key passphrase). Then click  save Public key  to save the key,  save private key  to save the private key. I suggest you put in a more secure place, one to prevent others peeping, and prevent accidental deletion. The next step is to set up on the remote Linux host.

1) Create a directory/root/.ssh and set permissions

[[email protected] ~]# mkdir/root/.ssh mkdir command is used to create a directory, will be detailed later, temporarily only understand.

[[email protected] ~]# chmod 700/root/.ssh chmod command is used to modify file attribute permissions, will be described in detail later.

2) Create File/Root/.ssh/authorized_keys

[[email protected] ~]# vim/root/.ssh/authorized_keys vim  command is a command to edit a text file, which is also described in detail in subsequent chapters.

3) Open the public key  file that you just generated, it is recommended to open it with WordPad, so look comfortable, copy from AAAA to   "----END SSH2 Public key----"   all content on the line, paste into/ root/.ssh/authorized_keys  file, make sure all words noon a line. (You can copy the copied content to Notepad and then edit it in one line to paste it into the file).

here to briefly explain how to paste, with vim to open the file, the file does not exist, so vim will be created automatically. Press the letter "I" and then press SHIFT + insert  to paste it (or click the mouse message) if it is already copied to the Clipboard. After pasting, then move the cursor to the front of the line to enter SSH-RAS&NBSP, and then press space. Press ESC again, and then enter a colon wq  that is  :wq  to save. Format such as:

4) Then set the Putty option, click on the Ssh–> Auth on the left side of the window, clicking Browse on the right side of the window ... Select the private key you just generated, then click Open, enter root at this time, you can login without entering the password.

If you set the key Passphrase in front, you will be prompted to enter the password at this point. For a more secure recommendation, you should set a key Passphrase.



From for notes (Wiz)

Linux Telnet | Beginner's Tutorial

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.