How to do not enter password SSH direct login Aliyun Linux Host

Source: Internet
Author: User
Tags exit copy log ssh aliyun linux

Server environment: Ali Server, Linux version-CentOS

Client environment: MAC OS X Terminal

In terminal with the SSH command login to the server each time to enter a password, although you can copy/paste the password, but after a period of time after the login does not operate, the server will automatically disconnect, the connection is also copied/pasted password, or some inconvenient.

Is there a way to achieve login without entering a password? There are ways to share this blog is the solution.

How does the server authenticate the client without entering a password? By certificate, a certificate is like a door card when you enter an office door. When the client logs on, the door card (certificate) is brushed on the server (certificate validation) and the server checks to see if the door card can open.

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/cloud-computing/

How to make a door card, how to tell the server the door card information? Use the following procedure to answer this question.

1. Open the wallet where you put the door card

CD ~/.ssh/

If you don't have a wallet, go and buy one:

mkdir ~/.ssh

2. Make the door card

SSH-KEYGEN-T RSA

Default door card filename: id_rsa.pub

3. Copy a door card and put it into the server's wallet

SCP Id_rsa.pub username@server:~/.ssh/id_rsa.pub

Note: if the. ssh folder is not on the server, you need to log on to the server to create it.

4. Log in to the server (need to enter a password), take the card from the server wallet, remove the information, put it into a dedicated mezzanine

SSH Username@server

CD ~/.ssh cat id_rsa.pub >> Authorized_keys

5. Destroy the door card in the server wallet

RM id_rsa.pub

6. Exit Server

Exit

7. No need to enter password when you log in again

SSH Username@server

Welcome Houyi VM System!

[Root@aliyun-cnblogs ~]#

No password SSH login is so simple!

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.