mscp

upaGPL-3.0活跃维护

用多条 SSH/SFTP 连接并行传输文件,突破单连接带宽限制,适合大文件或跨网络批量拷贝时提速。

mscp: transfer files over multiple SSH (SFTP) connections

v0.2.4发布于 2025-11-08 10:39 UTC270star26fork同步于 2026-11-07 07:34 UTC

怎么上手

由 README 提炼,执行前请确认
brew install upa/tap/mscp
硬件要求按 README 说明

README 未说明;仅要求远端运行支持 SFTP 子系统的标准 sshd(如 openssh-server),并能正常 ssh 登录

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

多线程 scp 工具,用多条 SSH/SFTP 连接并行传多个文件或大文件,缩短传输时间

用多条 SSH/SFTP 连接并行传输文件,突破单连接带宽限制,适合大文件或跨网络批量拷贝时提速。

核心能力

  • 多线程并行传输多个文件
  • 单个大文件分块并行传输
  • 用法与 scp 基本一致
  • 支持断点续传失败中断的传输
  • 远端只需标准 sshd 的 SFTP 子系统

容易踩的坑

从源码构建依赖打过补丁的 libssh,需先执行 git submodule update --init 并应用 patch;不支持远端到远端复制;传输目录无需 -r 选项,与 scp 习惯不同

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.2.4
  1. v0.2.4最新正式版2025-11-08 · 2025-11-08 10:39 UTC
    • fix password auth does not work (issue #36)
    • add Debian and Devuan to the install dep script (pr #38)
    • fallback to default terminal size on no tty (pr #39)
  2. v0.2.32025-08-12 · 2025-08-12 11:00 UTC
    查看更新说明
    • bump libssh version to 0.11.2 (#25)
    • adopt new AIO read API of libssh
    • fix path handling when remote dst path has suffix '/' (#24)
    • fix remote path handling including '~' (partially)
    • try pubkey auth first to avoid PerSourcePenalties
    • remove the single-binary version of mscp from release
  3. v0.2.22025-04-16 · 2025-04-16 08:21 UTC
    查看更新说明
    • bump cmake_minimum_version on libssh (#32)
    • fix quiet mode (#30)
    • use openssl@3 on macOS (#29)
    • add archlinux support (#28)

    This release is to fix broken installation on homebrew (#32)

  4. v0.2.12024-05-11 · 2024-05-11 12:35 UTC
    查看更新说明

    Release v0.2.1

    • fix broken checkpoint files when copying multiple files (#16)
    • fix broken password inputs for resume transfers (#17 and #18)
    • add support [kKmMgG] units for -s, -S, and -b options (#20)
    • change the default min chunk size to 16MB (#20)
    • change the default max chunk size to filesize / (nr_conn * 4) (#20)
    • -s and -S accept integers other than multiples of page sizes (#20)
    • help now shows available ciphers and HMACs (#20)
  5. v0.2.02024-04-15 · 2024-04-15 02:38 UTC
    查看更新说明

    Release v0.2.0

    • add -J DESTINATION option for ProxyJump (#15)
    • add -o SSH_OPTION option
    • add -L LIMIT_BITRATE option (#14)
    • add keyboard interactive authentication support. Also, we have manually tested that mscp works with cisco DUO MFA (#2)
    • remove -H disable host key check option (ssh_config or -o option can do this instead)
    • fix copying files of permission r--r--r--
    • update github actions: checkout v3 to v4, and codeql from v2 to v3
    • add ubuntu 24.04 test

    Full Changelog: https://github.com/upa/mscp/compare/v0.1.5...v0.2.0

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    mscp: multi-threaded scp

    build on ubuntu build on macOS build on FreeBSD test

    mscp, a variant of scp, copies files over multiple SSH (SFTP) connections by multiple threads. It enables transferring (1) multiple files simultaneously and (2) a large file in parallel, reducing the transfer time for a lot of/large files over networks.

    You can use mscp like scp, for example:

    $ mscp srcfile [email protected]:dstfile
    

    Remote hosts only need to run standard sshd supporting the SFTP subsystem (e.g. openssh-server), and you need to be able to ssh to the hosts as usual. mscp does not require anything else.

    https://github.com/upa/mscp/assets/184632/19230f57-be7f-4ef0-98dd-cb4c460f570d


    Major differences from scp on usage:

    • Remote-to-remote copy is not supported.
    • -r option is not needed to transfer directories.
    • Checkpointing for resuming failed transfer is supported.
    • and any other differences I have not implemented and noticed.

    Paper:

    • Ryo Nakamura and Yohei Kuga. 2023. Multi-threaded scp: Easy and Fast File Transfer over SSH. In Practice and Experience in Advanced Research Computing (PEARC '23). Association for Computing Machinery, New York, NY, USA, 320–323. https://doi.org/10.1145/3569951.3597582

    Install

    • macOS
    # Homebrew
    brew install upa/tap/mscp
    
    # MacPorts
    sudo port install mscp
    
    • Ubuntu
    sudo add-apt-repository ppa:upaa/mscp
    sudo apt-get install mscp
    
    • RHEL-based distributions
    sudo dnf copr enable upaaa/mscp
    sudo dnf install mscp
    

    Build

    mscp depends on a patched libssh. The patch introduces asynchronous SFTP Write, which is derived from https://github.com/limes-datentechnik-gmbh/libssh (see Re: SFTP Write async).

    We test building mscp on Linux (Ubuntu, Rocky, Alma, and Alpine), macOS, and FreeBSD.

    # clone this repository
    git clone https://github.com/upa/mscp.git
    cd mscp
    
    # prepare patched libssh
    git submodule update --init
    patch -d libssh -p1 < patch/$(git -C libssh describe).patch
    
    # install build dependency
    bash ./scripts/install-build-deps.sh
    
    # configure mscp
    mkdir build && cd build
    cmake ..
    
    # in macOS, you may need OPENSSL_ROOT_DIR for cmake:
    # cmake .. -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl@3
    
    # build
    make
    
    # install the mscp binary to CMAKE_INSTALL_PREFIX/bin (usually /usr/local/bin)
    make install
    

    Source tar balls (mscp-X.X.X.tar.gz, not Source code) in Releases page contain the patched version of libssh. So you can start from cmake with it.

    Documentation

    manpage is available.