老大,请教个问题 我目前在试试自动部署通过coding 看超哥的文档到了下面这一步
部署公钥
sudo -Hu apache ssh-keygen -t rsa # 请选择 "no passphrase",一直回车下去
sudo cat /var/www/.ssh/id_rsa.pub # 查看生成的密钥内容,复制全部
我运行出来的是(我的环境centos7 nginx1.10 php7 php-fpm的以nginx用户 nginx也是以nginx用户运行)
sudo -Hu nginx ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/var/cache/nginx/.ssh/id_rsa):
Could not create directory '/var/cache/nginx/.ssh': Permission denied
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
open /var/cache/nginx/.ssh/id_rsa failed: No such file or directory.
Saving the key failed: /var/cache/nginx/.ssh/id_rsa.
我想问一下 生成的id_rsa 怎么会自动到 /data/www/.ssh里面去