生成密钥对 ssh-keygen –t rsa –P '' 回车生成的密钥对:id_rsa和id_rsa.pub 把id_rsa.pub追加到authorized_keys里面 cat id_rsa.pub >> authorized_keys