scp带私钥使用以及免密配置

使用:转载:https://blog.csdn.net/xxq929604980/article/details/78924974

精华:从远程下载:scp -i id_rsa -r -P 32200 usrname@ip:/remote/path dev

           上传到远程:scp -i id_rsa -r -P 32200 dev usrname@ip:/remote/path

免密:https://blog.csdn.net/fmyzc/article/details/81135702

假设需要配置免密服务器A到服务器B:

1、生成成对的公私钥

2、公钥放b服务器,然后把公钥追加到/root/.ssh/authorized_keys 文件中

3、私钥放a服务器

完成

原文地址:https://www.cnblogs.com/to-here/p/12845028.html