ubuntu16.04 Server configuration ssh password-free login _linux

Source: Internet
Author: User
Tags ssh

On the client operation

SSH-KEYGEN-T RSA

File location write/home/try/.ssh/server_rsa, do not use default values, I named Server_rsa worry about the impact of Git key (because my git is using the default value)

Ssh-copy-id root@123.45.56.78 (Your server IP),

or this use

Cat ~/.ssh/id_rsa.pub | SSH user@123.45.56.78 "mkdir-p ~/.ssh && cat >> ~/.ssh/authorized_keys"

You can upload your client key to the server's ~/.ssh/authorized_keys file or manually copy it.

Operating on the server side

sudo nano/etc/ssh/sshd_config

Change this to Without-password to achieve root-free login

namely Permitrootlogin Without-password

SSH Shorthand Tips

Vim ~/.ssh/config

Add to

Host Lisa casually, just remember.

HostName 188.166.225.189 Your server IP

User Root

Port 9999 (ports from custom, recommended not add) (the last two I have not used, the first three sufficient)

Identityfile ~/.SSH/ID_RSA Certified key location, if it's already uploaded to the server.

Can be implemented using SSH Lisa instead of ssh root@188.166.225.186 effect

The above is a small set to introduce the ubuntu16.04 server configuration ssh password-free login, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

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.