Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to realize ssh login without password when setting up big data's environment

Shulou Source: shulou.com Published: 2022-06-01 20:47:09 10月03日 Update

Editor to share with you how to build big data environment to achieve ssh password-free login, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Yum search ssh: query installable ssh packages

Yum install-y openssh: install SSH package

Yum list installed openssh: query whether openssh is installed

Configure password-free login

1. Switch from root user to hadoop user

2. Create the. ssh file under the root path (/ home/hadoop)

Mkdir .ssh

3. Generate key

Ssh-keygen-t rsa-P ""

4. Enter the .ssh directory

Cd .ssh

5. Ls view

Look, there are public keys and private keys in it.

6. Put the public key into the linux authentication

Cp id_rsa.pub authorized_keys

7. Ls check that there is an authentication file authorized_keys in the directory

8. Check the specific content

Vi authorized_keys

9. Exit to the root directory for .ssh authorization

Chmod 700.ssh (RRV 4 wRV 2 x RV 1)

Chmod 6000.ssh / *

10. Test ssh with ssh hostname

Ssh cjqlinux

Configure sudo

1. Visudo goes to the editing page

2. Find the line root ALL = (ALL) ALL and copy and change the line.

3. Change the root user name to another user name to be configured.

4.: X Save and exit

The above is all the contents of the article "how to build big data's environment to achieve ssh password-free login". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: User password login content article configuration data environment public key file directory query authentication not much host name most key more root directory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft NVidia MySQL Apple Shulou Technology