Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Ssh secret-free login and matters needing attention

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Generate key pairs:

Ssh-keygen-t rsa just press enter all the time.

The files id_rsa (private key) and id_isa.pub (public key) are generated under the .ssh directory; by copying the contents of the public key to the .ssh file under the home directory of a user on the other machine, you can log in to the other host without password ssh. You need to establish the .ssh directory under the home directory of the other machine in advance and set permissions.

Mkdir .ssh & & chmod 700.ssh

You can also test the ssh secret-free login machine on this machine:

Cat. / id_rsa.pub > >. / authorized_keys & & chmod 644 authorized_keys

Ssh localhost

What is more important is that the permissions of the file must be set correctly, otherwise secret-free login will fail.

The .ssh directory should guarantee 700 permissions

The permissions of authorized_keys files should be guaranteed to be 644.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report