scp免密配置
scp lili@10.10.10.11:/home/lili/log/nginx/access.log-20190914.gz ./
scp免密配置注意项: .ssh 目录755权限,authorized_keys文件644权限
如果/home/lili/.ssh/ 目录不存在,或authorized_keys文件不存在
ssh-keygen -t rsa
a机子生成ssh目录,会一起生成公钥和私钥,把公钥内容复制追加到b机子的/home/work/.ssh/authorized_keys里,
b机子就能从a机子免密取文件
chmod 755 .ssh
cd .ssh
touch authorized_keys
chmod 644 authorized_keys
vim authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA2Nc5sWY4ajyWTM07SSEcNKp9JWYx8vCa9OREqzj1M+cwm+tOvBg1VTAv7qmd5DPkNqoMU65lA1sU1R4DiYk7y5rcFYy