Linux configuration SSH password-free login

Environment introduction

server function name of server server hostname
Actively initiate remote connection Server A serve
connected server Server B serverb

Configuration instructions

  • Generate a key pair on server A
ssh-keygen -t rsa

generate key pair

At this point, the key pair will be generated in the ~/.ssh directory on server A

  • Copy the key pair to the specified server B, and log in as the specified user
ssh-copy-id user@serverb

configuration effect

  • Directly use ssh@serverb to remotely, no need to enter a password

Guess you like

Origin blog.csdn.net/Lz__Heng/article/details/130104988