第一步:ssh的设置
把你的本地主机用户的ssh公匙文件写入到远程主机用户的~/.ssh/authorized_keys文件中,具体方法是假设本地主机为daqi3@10.129.1.1,远程主机daqi2@10.129.1.1
一:先屏蔽scp命令调用时出现的口令提示,在 daqi3@10.129.1.1主机里的用户
运行 ssh-keygen -t rsa
结果如下
Generating public/private rsa key pair.
Enter file in which to save the key(/home/.username/ssh/id_rsa):#回车
Enter passphrase (empty for no passphrase):#回车
Enter same passphrase again:#回车
Your identification has been saved in /home/.username/.ssh