Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to quickly configure SSH secret-free login

Shulou Source: shulou.com Published: 2022-06-02 05:24:16 11月15日 Update

This article mainly introduces "how to quickly configure SSH secret-free login". In daily operation, I believe many people have doubts about how to quickly configure SSH secret-free login. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to quickly configure SSH secret-free login". Next, please follow the editor to study!

Preface

We can use the ssh command to connect to the remote machine and perform operations on it, but we need a password every time we use ssh, which is not good for scripting:

$ssh 192.168.199.233

Root@192.168.199.233's password: preparation work

Prepare two machines:

Machine ARV 192.168.199.231

Machine BRV 192.168.199.233

We need to configure machine A to log on to machine B.

Configure secret-free login # Step 1: generate public / private rsa key pairs on machine A, and enter all the way to the end.

$ssh-keygen

# Step 2: copy the public key to machine C, and enter the machine C password after execution

$ssh-copy-id 192.168.199.233

This successfully configures secret-free login and can be skipped if Step 1 has already been executed.

If you need to configure machine C to log in to machine A without secret, you can do the same on machine C.

Verify password-free login $ssh 192.168.199.233

Last login: Tue May 5 10:31:40 2020 from 192.168.199.231 this is the end of the study on "how to quickly configure SSH secret-free login". I hope you can solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Machine login configuration learning password more preparation help utility same success next public key preface can pass command key copy article method Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Xiaomi OPPO Reno Shulou Information NVidia