Configure ssh password-less login and ssh password login

Source: Internet
Author: User

Configure ssh password-less login and ssh password login

Wanshi is only available after dual-host mutual configuration several times. I can't remember the direction, but I can't remember it here.


A wants to link B, and A gives B its own public key

1
Zxw @ hostUbuntu1 :~ $ Ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/zxw/. ssh/id_rsa ):
Enter passphrase (empty for no passphrase ):
Enter same passphrase again:
Your identification has been saved in/home/zxw/. ssh/id_rsa.
Your public key has been saved in/home/zxw/. ssh/id_rsa.pub.
The key fingerprint is:
F0: c0: a1: 2b: 67: 4a: 23: 77: 9a: 17: 0c: 23: 4d: 47: 25: 74 zxw @ hostUbuntu1
The key's randomart image is:
+ -- [RSA 2048] ---- +
|. O =. E |
| O. =. |
|. +. + |
|. +. + |
|. = B S |
| + X. |
| +. |
|. |
|
+ ----------------- +

2
Zxw @ hostUbuntu1 :~ $ Scp ~ /. Ssh/id_rsa.pub ip:. ssh/id_rsa_ppas1.pub

3
Zxw @ hostUbuntu2 :~ $ Touch. ssh/authorized_keys

4
Zxw @ hostUbuntu2 :~ $ Cat. ssh/id_rsa_11.pub>. ssh/authorized_keys
You can log on to hostUbuntu2 from hostUbuntu1 without a password.



-----------------

Please refer to the following source for reprinting:
Blog.csdn.net/beiigang

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.