现需设置 主机A 免密码登陆 主机B
主机A: 192.168.0.61 主机B: 192.168.0.62主机A的提示如下,在要求输入密码(Enter passphrase)的提示中按回车即为空密码
Generating public/private rsa key pair. Enter file in which to save the key (/Users/Allen/.ssh/id_rsa): /Users/Allen/.ssh/id_rsa Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/Allen/.ssh/id_rsa. Your public key has been saved in /Users/Allen/.ssh/id_rsa.pub. The key fingerprint is: SHA256:luC3egH9J9VEDYxToA8VS6oPlXT8jiViukOvmc/n2+I Allen@localhost The key's randomart image is: +---[RSA 2048]----+ | ..*B+o | | . B+.o .| | .. * .= | | ....+ooo + | | ..S+ o.= | | o++o o . | | ..+.o | | .++. o. | | ..++o+Eo. | +----[SHA256]-----+完成上述步骤后,下次在主机A(192.168.0.61)上使用ssh root@192.168.0.62 登陆主机B(192.168.0.62)将不需要密码
