前提:确保本机和目标机器都安装了ssh服务 sudo apt-get install ssh ssh-keygen ssh-copy-id -i ~/.ssh/id_rsa username@target-hostname