Linux Getting Started tutorial (v) remote login for Linux systems

Source: Internet
Author: User
Tags ssh secure shell

First of all, this part of the content for Linux Beginners is not particularly important, you can skip this chapter, first learn the next chapter, and then come back to see this chapter after learning .

Linuxare mostly applied to servers, and servers cannot be asPcThe same place in the office, they are placed inIdcRoom, so I usually log inLinuxThe system is via remote login。 LinuxIn the system is throughSshRemote login capabilities for service implementations。DefaultSshThe service is open.22 port, and when we install the system, the service is installed, and it is boot-initiated so we don't need to configure anything to directly telnet to linux system /etc/ssh/sshd_config, you can modify this configuration file to achieve the ssh service For example you can change the boot port to

If you areWindows's operating system, youLinuxRemote login requires additional terminal software installed on our machine。At present, the more common terminal login software hasSECURECRT, Putty, SSH Secure ShellAnd so on, many friends like to useSecureCRTBecause its function is very powerful, and the author likes to usePutty Just because it's small and very beautiful colors show linux on the server These softwares have many free editions online, you can download a try to play Putty login remote linux

If you downloaded the Putty, double-click putty.exe and then pop up the following window . I use putty for the English version, if you feel that the English use of awkward, you can download a Chinese version .

Because it is a remote login, the server you are logging into must have aIpor host name。ip ( if your linuxip , then please set a , how to set up please go to the next section to find ) 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 .

" using key authentication mechanism to telnet to Linux"

SshThe service supports a security authentication mechanism, that is, key authentication。The so-called key authentication is actually the use of a pair of cryptographic strings, one called the public key(Public key), (private key) , only the owner can see, used to decrypt SSH What about servers?

First Use the tool PUTTYGEN. EXE to generate a key pair . Open the tool PUTTYGEN. EXE as shown in the following:

The tool can generate three forms ofkey ssh-1 (RSA) SSH-2 (RSA) SSH-2 (DSA) We use the default format, ssh-2 (RSA). Number of bits in a generated key keykey Here we write

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, (inKey Passphrase there) can also be left blank then point Save the key, point save private key save private key I suggest you put it in a safer place to prevent others from peeping, and to prevent accidental deletion Then it's time to go to the remote The host is set up

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) to open the generatedPublic keyFile, it is recommended to use WordPad to open, so look comfortable some, copy fromAaaaStart to“----END SSH2 Public KEY----“All the content on the line, paste it into the/root/.ssh/authorized_keysFile, make sure all characters 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 is a brief introduction, how to paste, withVimAfter opening the file, the file does not exist, soVimis automatically created。Press the letterIThen simultaneously pressSHIFT + InsertPaste (or click the mouse message), if it is already copied to the Clipboard paste it, then move the cursor to the front of the line to enter ssh-ras wq Wq format:

4) set option, point window to the left of ssh–> Auth browse ... point when you enter root

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.

Linux Getting Started tutorial (v) remote login for Linux systems

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.