Linux using SSH Login

Source: Internet
Author: User

SSH can be used for remote logins under Linux without the need to enter a login password.
1, need to be logged on the machine has been installed SSH, each boot to be able to automatically run sshd.
2. Generate the key on your own host, using:

Ssh-keygen-t rsa-c "Your name" double quotation mark can write any unique identifier, the proposed name or email when executing the command, will be reminded to enter the password, the password is used when the key will be entered, you can directly confirm not to enter any password, but how to security, can be entered. If you accidentally steal the private key and the public key, you must enter a password to use it.

After execution, it is produced under ~/.ssh/: Id_rsa and id_rsa.pub two files, which are the private key and the latter the public key.
3. Next, pass the public key to the machine to be logged in, use which account to log in, put it under the account. SSH folder, such as login to the PI user, then put the public key to:/home/pi/.ssh/folder, if not. SSH, then use mkdir to build.
4. Use the following instructions:

Cat ~/.ssh/id_rsa.pub | SSH @ ' cat?. Ssh/authorized_keys '
Such as:

SSH is the target user name and IP at login, such as 192.168.1.103, the user name is PI on the target computer.
Then use

Cat ~/.ssh/id_rsa.pub | SSH [email protected] ' cat? ~/.ssh/authorized_keys '
command to append the id_ras.pub to the Authorized_keys, which holds the identity entry that can be accessed.

Complete.

Linux using SSH Login

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.