使用Shell脚本在不同服务器上交换文件的有效方法有哪些?
我想使用自动脚本和不同服务器上的目标文件来更新服务器中的某些文件。 还没开始,不过我想这个过程中会出现授权和连接的问题。 关于我如何处理有什么建议吗?
谢谢
I want to update some file in a server, with an automated script and the target files on a different server. Haven't started yet, but I think there will be authorization and connection issues during the process. Any suggestion on how I could approach?
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
设置 ssh 密钥,这样您就不需要密码。 然后您可以使用
scp
或rsync
。更复杂的系统:
Set up ssh keys so that you do not need a password. You can then use
scp
orrsync
.More sophisticated systems: