如何安全传输

发布于 2024-08-29 01:26:51 字数 196 浏览 2 评论 0原文

我有两台服务器——一台后端服务器和一台前端服务器。每天晚上,后端服务器都会生成静态.html 文件,然后将其压缩为.tar 格式。

我需要编写一个驻留在后端服务器上的脚本,该脚本会将 .tar 文件传输到前端服务器,然后将该 .tar 文件解压缩到前端服务器的公共 Web 目录中。

执行此操作的标准、安全方法是什么?

提前致谢。

I have two servers -- a backend server, and a frontend server. Every night, the backend server generates static .html files, which are then compressed into .tar format.

I need to write a script that resides on the backend server that will transfer the .tar file to the frontend server, and then decompress that .tar file into to the public web directory of the frontend server.

What is the standard, secure way to do this?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

安稳善良 2024-09-05 01:26:51

执行此操作的最佳选择是rsync。它将为您处理压缩,并通过合理构建的脚本传输最少的数据。使用 rsync,您无需担心压缩或传输,只需意识到它的工作原理即可。使用正确的参数(即 ssh

rsync 示例:(

  /usr/bin/rsync -vxSHrae "ssh -l backups" /opt/redmine [email protected]::redmine

替换明显的并使用 ssh 密钥...)

best option for doing this is rsync. It will handle the compression for you and with a sensibly constructed script transfer the minimum. With rsync you don't need to worry about the compression or transfer, just realise that it works. With the right paramters (i.e. ssh

Example rsync:

  /usr/bin/rsync -vxSHrae "ssh -l backups" /opt/redmine [email protected]::redmine

(replace the obvious and use ssh keys...)

維他命╮ 2024-09-05 01:26:51

在安全、加密的连接上使用 SFTP 或仅使用普通 FTP。

Either use SFTP or just plain FTP on an secure, encrypted connection.

梨涡少年 2024-09-05 01:26:51

使用 IPSec,然后使用您当前使用的任何内容复制文件。

您将获得身份验证(因此您知道自己在与谁交谈)、加密(因此没有人可以读取数据)和完整性检查(因此没有人可以摆弄这些位。)

Use IPSec and then copy the files using whatever you currently use.

You'll get authentication (so you know who you're talking to), encryption (so no-one can read the data) and integrity checking (so no-one can twiddle with the bits.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文