PHPackages                             i-amdroid/sshfs-mount-tool - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. i-amdroid/sshfs-mount-tool

ActiveProject[CLI &amp; Console](/categories/cli)

i-amdroid/sshfs-mount-tool
==========================

CLI for manage and mount SSH connections as file system volumes.

5.0.0(3w ago)8371CC0-1.0PHPPHP &gt;=8.4

Since Jul 28Pushed 3w ago1 watchersCompare

[ Source](https://github.com/i-amdroid/sshfs-mount-tool)[ Packagist](https://packagist.org/packages/i-amdroid/sshfs-mount-tool)[ Docs](https://github.com/i-amdroid/sshfs-mount-tool)[ RSS](/packages/i-amdroid-sshfs-mount-tool/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (10)Versions (21)Used By (0)

SSHFS Mount Tool
================

[](#sshfs-mount-tool)

SSHFS Mount Tool (SMT) — CLI tool for manage and mount SSH connections as file system volumes.
SMT is a wrapper around SSHFS but designed to work with minimal typing.

 [![](https://camo.githubusercontent.com/9e65ed12e8767ca0a32fac3b7015ca8a43e4ce4d11f41a7b2af9b5494d26a64f/68747470733a2f2f63646e2e7261776769742e636f6d2f692d616d64726f69642f73736866732d6d6f756e742d746f6f6c2f322e782f736d742e7376673f763d322e312e30)](https://camo.githubusercontent.com/9e65ed12e8767ca0a32fac3b7015ca8a43e4ce4d11f41a7b2af9b5494d26a64f/68747470733a2f2f63646e2e7261776769742e636f6d2f692d616d64726f69642f73736866732d6d6f756e742d746f6f6c2f322e782f736d742e7376673f763d322e312e30)

Requirements
------------

[](#requirements)

- Linux/macOS
- PHP CLI &gt;= 8.4
- SSHFS

Installation
------------

[](#installation)

### Install SSHFS

[](#install-sshfs)

Ubuntu:

```
sudo apt install sshfs
```

macOS ([macFUSE](https://osxfuse.github.io/)):

```
brew install --cask macfuse
brew install gromgit/fuse/sshfs-mac
```

### Install SSHFS Mount Tool

[](#install-sshfs-mount-tool)

**Option 1: Install with Composer**

```
composer global require i-amdroid/sshfs-mount-tool
```

Check that the Composer bin directory exists in your PATH. Depending on your OS, Composer bin directory can be `$HOME/.composer/vendor/bin` or `$HOME/.config/composer/vendor/bin` ([read more](https://getcomposer.org/doc/03-cli.md#composer-home)). Depending on your shell, it can be set in `~/.bash_profile`, `~/.bashrc`, `~/.zshrc` etc.

If the Composer bin directory does not exist in PATH, add it like this:

```
export PATH="$PATH:$HOME/.composer/vendor/bin"
```

or

```
export PATH="$PATH:$HOME/.config/composer/vendor/bin"
```

**Option 2: Manual installation**

Download the latest phar from [Releases](https://github.com/i-amdroid/sshfs-mount-tool/releases).

```
chmod 755 smt.phar
sudo mv smt.phar /usr/local/bin/smt
```

Usage
-----

[](#usage)

**Add connection**

```
smt add -v
```

Connection properties:

PropertyDescription`id`Connection ID`title`Title`server`Server`port`Port`user`Username`password`Password`key`Path to key file`mount`Mount directory`remote`Remote directory`options`List of SSHFS options`ssh_options`List of SSH optionsConnections can be stored in YAML file in `~/.config/smt/smt.yml` (global) or in `smt.yml` in current directory. Files are created with `0600` permissions so passwords stored in them are only readable by you.

`ssh_options` are not prompted during `add` command, so they need to be added to a config file manually.

Example of the config file:

```
connections:
  msrv:
    title: myserver
    server: server.com
    port: null
    user: iam
    password: null
    key: ~/.ssh/id_rsa
    mount: ~/mnt/msrv
    remote: /var/www
    options:
      - some_option
      - SomeAnotherOption=yes
    ssh_options:
      - '-o SomeOption=100'
      - '-f SomeFlag 200'
```

**Mount connection**

```
smt
```

or just:

```
smt
```

It will show saved connections to choose one or automatically mount if only one connection exist in a config file.

**Unmount connection**

```
smt um
```

or:

```
smt um
```

**All commands**

`smt (mount) [, -p ]` — Mount connection
`smt unmount (um) []` — Unmount connection
`smt add` — Add connection
`smt remove (rm) []` — Remove connection
`smt list (ls) []` — List connection properties
`smt status (st)` — Show status of connections
`smt config (cfg)` — Open config file
`smt help (-h) []` — Show help
`smt --version (-V)` — Show version
`smt info (--info, -i)` — Show information about dependencies
`smt completion []` — Dump the shell completion script (supports connection ID completion)
`smt shell-init ` — Print a shell wrapper enabling in-place `smt cd`

**SSH &amp; cd — same tab vs new tab**

`smt ssh [, -p , -t/--new-tab]` — Launch SSH session
`smt cd [, -e/--eval]` — Change directory to the connection's mount directory

By default `smt ssh` attaches to the **current** terminal tab (ssh owns the TTY until you exit it). Pass `-t`/`--new-tab` to open a new tab instead. New-tab mode is only supported in default Ubuntu terminal (gnome-terminal), default macOS terminal (Terminal.app) and iTerm.

A child process cannot change its parent shell's working directory, so `smt cd` defaults to spawning a new tab. Install the shell wrapper once and `smt cd ` will change the **current** tab instead:

```
# bash or zsh — add to ~/.bashrc / ~/.zshrc
eval "$(smt shell-init bash)"      # or: zsh

# fish — add to ~/.config/fish/config.fish
smt shell-init fish | source
```

After that, `smt cd msrv` changes your shell's directory in-place. Under the hood the wrapper calls `smt cd --eval`, which prints a quoted `cd '…'` command to stdout for `eval`. All other subcommands (`mount`, `ssh`, `add`, …) pass through the wrapper unchanged.

Launching SSH sessions with password authentication requires `sshpass`. Passwords are fed via a 0600 temporary file (`sshpass -f`) instead of the command line, so they are not visible in `ps`.

Installing on Ubuntu:

```
sudo apt install sshpass
```

Installing on macOS:

```
brew install hudochenkov/sshpass/sshpass
```

**Config files**

Global config file `~/.config/smt/smt.yml` useful for storing multiple often used connections.

Config file `smt.yml` in current directory useful for storing per-project connections in project folder. If only one connection exist in a config file, it is automatically used as `` argument for commands. For example:

`smt` — Mount connection
`smt um` — Unmount connection

If SMT run from folder which contain `smt.yml` file, this file is used as a config file. Otherwise, the global config file is used. For using a global config file from folder which contains `smt.yml` file, use a global option (`-g, --global`).

SMT also supports user preferences in `~/.config/smt/config.yml` file. Preferences allow customizing SSHFS commands, default options, add new terminals, choose editor, default mount folder, default global option state.

Development
-----------

[](#development)

SMT initially has been written on pure PHP.

V2 has been completely rewritten with the Symfony Console component.

V3 has been upgraded to use Symfony 6.2.

V4 has been upgraded to use Symfony 6.3.

V4.1 has been upgraded to use Symfony 6.4.

V4.2 has been upgraded to use Symfony 7.

V5 is a full rewrite targeting PHP 8.4 and Symfony 8 with a proper layered architecture:

- Procedural `includes/bootstrap.inc` replaced with typed, testable services (`Config`, `Connection`, `Mount`, `Ssh`, `Terminal`, `Process` namespaces).
- All shell concatenation replaced with `Process` argv invocations. Passwords are passed to `sshfs` via stdin and to `ssh` via an ephemeral 0600 tempfile (`sshpass -f`) — never via the command line.
- Commands use the `#[AsCommand]` attribute, `SymfonyStyle`, `ConfirmationQuestion`, and expose shell-completion suggestions for `connection_id`.
- Config/preferences files are now written with `0600` perms and directories with `0700`.
- PHPUnit tests (unit + integration with `CommandTester`) and Mago for formatting / linting / analysis.

Any contributions are welcome.

**Build**

Dev tools (mago, phpunit) come from the main `require-dev`; [Box](https://github.com/box-project/box) lives in an isolated `vendor-bin/box/` sandbox managed by [bamarni/composer-bin-plugin](https://github.com/bamarni/composer-bin-plugin), so its dependency tree is decoupled from the app's.

1. Clone project
2. Install dependencies

    ```
    composer install
    ```
3. Install Box (runs once, then cached)

    ```
    composer bin box install
    ```
4. Build the phar

    ```
    composer box
    ```

**Development tasks**

```
composer lint        # mago lint
composer format      # mago format
composer test        # phpunit
```

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance95

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~148 days

Recently: every ~109 days

Total

20

Last Release

22d ago

Major Versions

1.0.1 → 2.0.02018-08-09

1.0.2 → 2.0.12018-08-09

2.3.0 → 3.0.02022-02-27

3.x-dev → 4.0.02023-10-01

4.2.0 → 5.x-dev2026-04-20

PHP version history (5 changes)1.0.0PHP ^7.1.3

3.0.0PHP &gt;=8.0.2

4.0.0PHP &gt;=8.1.0

4.x-devPHP &gt;=8.2.0

5.x-devPHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/6a8f28f34623f9f0df76b60f7620c0ffe8ef6acfdf6e10d23265bbfe1e6bde9a?d=identicon)[i-amdroid](/maintainers/i-amdroid)

---

Top Contributors

[![i-amdroid](https://avatars.githubusercontent.com/u/4057077?v=4)](https://github.com/i-amdroid "i-amdroid (89 commits)")

---

Tags

climanagermountSSHFS

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/i-amdroid-sshfs-mount-tool/health.svg)

```
[![Health](https://phpackages.com/badges/i-amdroid-sshfs-mount-tool/health.svg)](https://phpackages.com/packages/i-amdroid-sshfs-mount-tool)
```

###  Alternatives

[n98/magerun

Tools for managing Magento projects and installations

1.4k264.7k7](/packages/n98-magerun)[n98/magerun2

Tools for managing Magento projects and installations

928244.3k6](/packages/n98-magerun2)[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[laminas/laminas-cli

Command-line interface for Laminas projects

563.7M54](/packages/laminas-laminas-cli)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
