Putty, Xshell remote connection Linux and key authentication

Source: Internet
Author: User
Tags key string

First, remote login

Note: First of all to ensure that the virtual machine and the host can ping each other, if not ping general follow-up work cannot be done.

1. Putty Remote Login

First in a Putty software group Putty.zip (including Putty, Puttygen, etc.)

--># ifconfig querying its own IP

--Open the Putty-->host name field to enter the virtual machine's ip-->saved session (named) Putty

Note: port (ports) can be changed, but there is no need to change

--Here you can personalize the putty

-Open putty

--Select the aming-01 you just saved to load (load)

-->open Open the link for remote login

Enter your user name and password to log in to the system

2. Xshell Remote Login

Download and install Xshell

--open Xshell into session window

-New session and naming, host, port and other settings, where IP with CentOS IP, on the left side of the Xshell can be personalized settings

--Authentication settings (authentication method selection Password)

-Set user name and password (same as CentOS)

Click Open to Telnet to CentOS when the setup is complete.

3. Comparison of Putty, Xshell and virtual machines

1) After remote login with putty and Xshell, you can view the historical operation and various long information in the window freely (can be viewed up and down).

2) using putty and Xshell for remote login can copy the information of the window (left mouse button selected) and paste (right mouse button)

3) Xshell can save login account and password, log in again when you can not enter the user name and password directly into the system, Xshell can also be multi-window display and editing.

Extended:

1. Mouse settings

Xshell can set the middle mouse button and the right button's function through the tools-----keyboard and mouse.

2. Virtual machine Snapshot function : similar to one-click Restore

Right-click the virtual machine name----Take a snapshot--and save after naming!

Key Authentication (note: The so-called key is a key that consists of a public key and a private key the )

1, Putty key authentication

--Virtual Machine login Linux System

--Open Puttygen under the Putty installation directory

--click Generate to generate the key string

-and generate the public key as follows (the public key can be copied directly to the Linux key file without saving)

(The window is temporarily closed or saved for insurance purposes)

-Set the private key password (you need to save and set the password)

--Enter the Linux system:

# Mkdir/root/.ssh Creating a Directory

# chmod 700/root/.ssh Change the permissions of the. SSH directory

# Vi/root/.ssh/authorized_keys Create and open a file named "Authorized_keys"

--Enter the following interface, click "I" =insert into the edit state

--Copy the public key generated by Puttygen, right-click in the window (paste)

: ESC exits Edit state

: Wq Save and exit

--Turn off firewall selinux

# Setenforce 0

--Open putty, load user aming-01, and click on the right side of the window SSH directory auth

And then return to the Session directory to save the saved save

-->open Login system, this time the login prompt has changed

Complete!

(Note: You can still log in with a password after setting up key authentication, this permission can be changed)

2, Xshell key authentication

--Tools

--Select New user key to enter the following window, leave the default

-click Next to enter the Generate key window (the active mouse is also needed here and the public key will be generated soon)

-click Next to enter the key information window (name here and set the private key password)

-click Done to enter the Public Key registration window (where the generated key string is displayed), where the public key is saved!!!

--Enter the Linux system for editing (the directory has been generated since the Putty key authentication. SSH and file "Authorized_keys", so you can edit directly here)

# Vi/root/.ssh/authorized_keys

With putty, paste the public key generated by the Xshell into the file

Save and Exit!

--Edit Xshell file

--Select the attribute and enter the "User Authentication" interface to change the authentication method to public key

-Browse to select the key you just saved and enter the private key password you set

-Connect >> go directly to the Linux system (because Xshell will save key information so you can enter the system without entering your username and password)

( Note: Public key files for Putty and Xshell can be opened for viewing with WordPad )


Putty, Xshell remote connection Linux and key authentication

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.