SSH logon principle, ssh Logon

Source: Internet
Author: User

SSH logon principle, ssh Logon

  • Nature

SSH is a network protocol (Application Layer) used for encrypted login between computers.

SSH has multiple implementations, both commercial and open-source. OpenSSH is an open-source implementation.

 

  • Basic usage
$ Ssh-p 22 user @ host

-P: Custom port. The default value is 22. If the local user name is the same as the remote user name, the user name can be omitted during logon.

 

  • Basic Principles

 

Password Logon:

(1) the remote host receives the user's login request and sends its public key to the user. If the public key of the remote host is accepted, the remote host is saved in the $ HOME/. ssh/known_hosts file.

(2) The user uses this public key to encrypt the logon password and send it to the remote host.

(3) the remote host uses its own private key to decrypt the login password. If the password is correct, the user is allowed to log on.

Public Key password-free login:

(1) The user saves his/her public key on the remote host. The remote host saves the user's public key in the $ HOME/. ssh/authorized_keys file of the user's main directory after logon.

(2) When you log on, the remote host sends a random string to the user.

(3) The user uses his/her own private key for encryption and then sends it back.

(4) the remote host uses the pre-stored Public Key for decryption. If matched, it proves that the user is trusted.

 

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.