linux下生成ssh密钥并获取密钥并免密登陆

生成密钥:

ssh-keygen -t rsa -f ~/.ssh/id_rsa -N '密码'

获取密匙:

cat ~/.ssh/id_rsa.pub

免密登陆:

ssh-copy-id master