Linux remote login and password-free login

Source: Internet
Author: User

Recently learned something about Linux, one of which is about SSH (Linux remote login)

Here's a summary:

First, about SSH installation

Suppose we need to log on to host bit B, terminal input on Host B: SSH localhost

If it appears:


This means that SSH is not installed, so you need to install SSH

Enter sudo apt-get install openssh-server for installation

PS: If the installation fails here, it may be that one of your dependencies is incorrect, just reinstall it by its name.

Installation is successful!

Landing is very simple.

Then we enter the host a in our remote operation:

SSH [user name]@[b host password]


Again, password-free login

Terminal input in Host A: Ssh-keygen

followed by the default carriage return (enter y when Y is required)

This time into your. SSH directory and found a file called Id_rsa.pub

In terminal input: Ssh-copy-id-i id_rsa.pub [target host user name]@[Host B's IP]

You can do it.

In addition, if you enter into the. SSH document in your operating host B, you will find a name called Authorized_keys

This is your login key! @¥##%# Although I do not know what, in a word you want to delete this, you can not go up qaq

Linux remote login and password-free 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.