ssh免密码登陆
1.
$ssh-keygen -t rsa#生成RSA密钥对
2.
$ssh-copy-id -i ~/.ssh/id_rsa.pub hostname
#输入完密码后,会有如下输出
Now try logging into the machine, with "ssh 'linux-kc7s'", and check in:
~/.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
3.
$ssh hostname
#访问目标