[Translated] 20190124 ffsend - Easily And Securely Share Files From Linux Command Line Using Firefox Send Client.md

Signed-off-by: FSSlc <fsslc235@gmail.com>
This commit is contained in:
FSSlc 2020-03-28 12:36:55 +08:00
parent 184c7cf94e
commit 03496b129a
No known key found for this signature in database
GPG Key ID: B139D3D732718068

View File

@ -1,91 +1,79 @@
[#]: collector: (lujun9972)
[#]: translator: (FSSlc)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (ffsend Easily And Securely Share Files From Linux Command Line Using Firefox Send Client)
[#]: via: (https://www.2daygeek.com/ffsend-securely-share-files-folders-from-linux-command-line-using-firefox-send-client/)
[#]: author: (Vinoth Kumar https://www.2daygeek.com/author/vinoth/)
[#]: collector: "lujun9972"
[#]: translator: "FSSlc"
[#]: reviewer: " "
[#]: publisher: " "
[#]: url: " "
[#]: subject: "ffsend Easily And Securely Share Files From Linux Command Line Using Firefox Send Client"
[#]: via: "https://www.2daygeek.com/ffsend-securely-share-files-folders-from-linux-command-line-using-firefox-send-client/"
[#]: author: "Vinoth Kumar https://www.2daygeek.com/author/vinoth/"
ffsend Easily And Securely Share Files From Linux Command Line Using Firefox Send Client
ffsend - 在 Linux 命令行中通过 FireFox Send 服务来简单安全地分享文件
======
Linux users were preferred to go with scp or rsync for files or folders copy.
Linux 用户更偏爱使用 `scp``rsync` 来进行文件或目录的复制拷贝。很多新的可选方式正发生在 Linux 上,因为 Linux 是开源的,所以任何人都可以为 Linux 开发一个安全软件。
However, so many new options are coming to Linux because its a opensource.
在过去我们已经写了多篇有关安全分享这个话题的文章,它们分别是 **[OnionShare][1]** , **[Magic Wormhole][2]** , **[Transfer.sh][3]** 和 **[Dcp Dat Copy][4]**.
Anyone can develop a secure software for Linux.
今天我们甚至还将继续讨论这个话题,我们将介绍名为 `ffsend` 的工具。
We had written multiple articles in our site in the past about this topic.
### ffsend 是什么?
Even, today we are going to discuss the same kind of topic called ffsend.
[ffsend][5] 是 Firefox Send 服务的一个命令行客户端,允许用户通过命令行来传递和接收文件或目录。
Those are **[OnionShare][1]** , **[Magic Wormhole][2]** , **[Transfer.sh][3]** and **[Dcp Dat Copy][4]**.
它允许我们通过一个安全、私密、加密的链接,使用一个简单的命令来轻易安全地分享文件和目录。
### Whats ffsend?
使用 Firefox 的 Send 服务,文件可以被共享,最大允许的文件大小为 2GB译者注现在官网上写的是最大 1GB登录后最大 2.5GB)。其他人可以通过这个工具或者网页浏览器来下载这些被分享的文件。
[ffsend][5] is a command line Firefox Send client that allow users to transfer and receive files and folders through command line.
所有的文件总是在客户端被加密,并且秘钥将不会被远程主机所分享。另外,你还可以为上传的文件设置密码。
It allow us to easily and securely share files and directories from the command line through a safe, private and encrypted link using a single simple command.
被上传的文件在被下载(默认被下载 1 次,最多可被下载 10 次)后或者 24 小时后,它们将被自动删除。这将确保你的文件不会永远的保留在网络上。
Files are shared using the Send service and the allowed file size is up to 2GB.
该工具当前处于 alpha 阶段,使用时请自担风险。而且,当前只有有限个安装选项可用。
Others are able to download these files with this tool, or through their web browser.
### ffsend 的特点:
All files are always encrypted on the client, and secrets are never shared with the remote host.
* 全功能且友好的命令行工具
* 安全地上传和下载文件与目录
* 在客户端总是被加密
* 额外的密码保护,密码生成和可配置下载次数限制
* 内置文件或目录的打包和解压
* 可以简单地管理你的历史分享记录
* 能够使用你自己的发送主机
* 查看或者删除共享文件
* 精准的错误报告
* 由加密或上传下载导致的低内存消耗
* 无需集成就可被用在脚本中
Additionally you can add a password for the file upload.
### 如何在 LInux 中安装 ffsend 呢?
The uploaded files will be removed after the download (default count is 1 up to 10) or after 24 hours. This will make sure that your files does not remain online forever.
当前除了 Debian 和 Arch Linux 系统,其他发行版还没有相应的安装包(译者注:这个信息已过时,最新内容请看[这里](https://github.com/timvisee/ffsend#install))。然而,我们可以轻易地根据我们自己的操作系统和架构下载到相应的预编译二进制文件。
This tool is currently in the alpha phase. Use at your own risk. Also, only limited installation options are available right now.
### ffsend Features:
* Fully featured and friendly command line tool
* Upload and download files and directories securely
* Always encrypted on the client
* Additional password protection, generation and configurable download limits
* Built-in file and directory archiving and extraction
* History tracking your files for easy management
* Ability to use your own Send host
* Inspect or delete shared files
* Accurate error reporting
* Low memory footprint, due to encryption and download/upload streaming
* Intended to be used in scripts without interaction
### How To Install ffsend in Linux?
There is no package for each distributions except Debian and Arch Linux systems. However, we can easily get this utility by downloading the prebuilt appropriate binaries file based on the operating system and architecture.
Run the below command to download the latest available version for your operating system.
运行下面的命令来为你的操作系统下载 `ffsend` 最新可用的版本(译者注:当前最新版本为 v0.2.58
```
$ wget https://github.com/timvisee/ffsend/releases/download/v0.1.2/ffsend-v0.1.2-linux-x64.tar.gz
```
Extract the tar archive using the following command.
然后使用下面的命令来解压 tar 包:
```
$ tar -xvf ffsend-v0.1.2-linux-x64.tar.gz
```
Run the following command to identify your path variable.
接着运行下面的命令来查看你的 `PATH` 环境变量:
```
$ echo $PATH
/home/daygeek/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
```
As i told previously, just move the executable file to your path directory.
正如我先前告知的那样,下面我们要做的就是将这个可执行文件放置到 `PATH` 环境变量中的某个目录中:
```
$ sudo mv ffsend /usr/local/sbin
```
Run the `ffsend` command alone to get the basic usage information.
直接运行 `ffsend` 可以获取其基本使用信息:
```
$ ffsend
@ -103,30 +91,30 @@ To show all subcommands, features and other help:
ffsend help [SUBCOMMAND]
```
For Arch Linux based users can easily install it with help of **[AUR Helper][6]** , as this package is available in AUR repository.
对于使用基于 Arch Linux 系统的用户可以简单地借助 **[AUR Helper][6]** 来安装它,因为这个包已经在 AUR 软件仓库中了。
```
$ yay -S ffsend
```
For **`Debian/Ubuntu`** systems, use **[DPKG Command][7]** to install ffsend.
对于使用 **`Debian/Ubuntu`** 系统的用户,使用 **[DPKG 命令][7]** 来安装 `ffsend`
```
$ wget https://github.com/timvisee/ffsend/releases/download/v0.1.2/ffsend_0.1.2_amd64.deb
$ sudo dpkg -i ffsend_0.1.2_amd64.deb
```
### How To Send A File Using ffsend?
### 如何使用 ffsend 来发送文件?
Its not complicated. We can easily send a file using simple syntax.
这并不复杂,我们可以简单地通过下面的语法来发送文件。
**Syntax:**
**语法:**
```
$ ffsend upload [/Path/to/the/file/name]
```
In the following example, we are going to upload a file called `passwd-up1.sh`. Once you upload the file then you will be getting the unique URL.
在下面的例子中,我们将上传一个名为 `passwd-up1.sh` 的文件,一旦你上传了该文件,你将得到一个唯一的 URL。
```
$ ffsend upload passwd-up1.sh --copy
@ -136,15 +124,15 @@ Share link: https://send.firefox.com/download/a4062553f4/#yy2_VyPaUMG5HwXZzYRmpQ
![][9]
Just download the above unique URL to get the file in any remote system.
在任何远端的系统上,只需要使用上面那个唯一的 URL 就可以下载上传的文件了。
**Syntax:**
**语法:**
```
$ ffsend download [Generated URL]
```
Output for the above command.
命令的输出如下:
```
$ ffsend download https://send.firefox.com/download/a4062553f4/#yy2_VyPaUMG5HwXZzYRmpQ
@ -153,13 +141,13 @@ Download complete
![][10]
Use the following syntax format for directory upload.
使用下面的语法来对目录进行上传:
```
$ ffsend upload [/Path/to/the/Directory] --copy
```
In this example, we are going to upload `2g` directory.
在下面的例子中,我们将上传一个名为 `2g` 的目录:
```
$ ffsend upload /home/daygeek/2g --copy
@ -170,7 +158,7 @@ Upload complete
Share link: https://send.firefox.com/download/90aa5cfe67/#hrwu6oXZRG2DNh8vOc3BGg
```
Just download the above generated the unique URL to get a folder in any remote system.
在任意的远端系统中,只需要利用上面生成的唯一 URL 就可以获取到刚才上传的目录了。
```
$ ffsend download https://send.firefox.com/download/90aa5cfe67/#hrwu6oXZRG2DNh8vOc3BGg
@ -179,7 +167,7 @@ Extracting...
Download complete
```
As this already send files through a safe, private, and encrypted link. However, if you would like to add a additional security at your level. Yes, you can add a password for a file.
上面已经通过安全、私密和加密过的链接来发送了文件。然而,如果你想在你的掌控范围内再添加额外的安全措施,你可以为文件添加密码。
```
$ ffsend upload file-copy-rsync.sh --copy --password
@ -188,7 +176,7 @@ Upload complete
Share link: https://send.firefox.com/download/0742d24515/#P7gcNiwZJ87vF8cumU71zA
```
It will prompt you to update a password when you are trying to download a file in the remote system.
当你在远端系统中尝试下载该文件时,它将要求你输入密码:
```
$ ffsend download https://send.firefox.com/download/0742d24515/#P7gcNiwZJ87vF8cumU71zA
@ -197,7 +185,7 @@ Password:
Download complete
```
Alternatively you can limit a download speed by providing the download speed while uploading a file.
另外,你还可以在上传过程中提供下载次数限制来限制文件被下载的次数。
```
$ ffsend upload file-copy-scp.sh --copy --downloads 10
@ -205,16 +193,16 @@ Upload complete
Share link: https://send.firefox.com/download/23cb923c4e/#LVg6K0CIb7Y9KfJRNZDQGw
```
Just download the above unique URL to get a file in any remote system.
然后你可以在任意的远程系统中使用上面的唯一 URL 来下载该文件:
```
ffsend download https://send.firefox.com/download/23cb923c4e/#LVg6K0CIb7Y9KfJRNZDQGw
Download complete
```
If you want to see more details about the file, use the following format. It will shows you the file name, file size, Download counts and when it will going to expire.
假如你想看这个链接的更多细节,你可以使用下面的命令来查看它的信息,它将为你展示文件名称、文件大小、被下载次数以及过期时间。
**Syntax:**
**语法:**
```
$ ffsend info [Generated URL]
@ -228,7 +216,7 @@ Downloads: 3 of 10
Expiry: 23h58m (86280s)
```
You can view your transaction history using the following format.
此外,你还可以使用下面的命令来查看你的传输历史:
```
$ ffsend history
@ -241,9 +229,9 @@ $ ffsend history
6 https://send.firefox.com/download/69afaab1f9/#5z51_94jtxcUCJNNvf6RcA 23h43m
```
If you dont want the link anymore then we can delete it.
假如你不想再分享某个链接,你可以使用下面的语法来删除它:
**Syntax:**
**语法:**
```
$ ffsend delete [Generated URL]
@ -252,15 +240,15 @@ $ ffsend delete https://send.firefox.com/download/69afaab1f9/#5z51_94jtxcUCJNNvf
File deleted
```
Alternatively this can be done using firefox browser by opening the page <https://send.firefox.com/>.
另外,你还可以通过使用 firefox 浏览其打开 https://send.firefox.com/ 来完成相应的分享。
Just drag and drop a file to upload it.
只需要拖拽该文件就可以上传它:
![][11]
Once the file is downloaded, it will show you that 100% download completed.
一旦该文件被下载,它将展示 100% 的下载状态。
![][12]
To check other possible options, navigate to man page or help page.
想查看其他的可能选项,请浏览它对应的 man 信息或者帮助页:
```
$ ffsend --help
@ -309,7 +297,7 @@ via: https://www.2daygeek.com/ffsend-securely-share-files-folders-from-linux-com
作者:[Vinoth Kumar][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[FSSlc](https://github.com/FSSlc)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出