#ssh #linux #sftp #utility

app sshmount

Mount the directory to which the ssh connection is made

8 releases

0.1.8 Aug 11, 2024
0.1.7 Mar 7, 2024
0.1.6 Feb 12, 2024
0.1.5 Dec 24, 2023
0.1.0 Feb 9, 2023

#102 in Filesystem

Download history 9/week @ 2024-07-01 69/week @ 2024-08-05 45/week @ 2024-08-12 9/week @ 2024-09-16 58/week @ 2024-09-23

67 downloads per month

Apache-2.0

195KB
1K SLoC

日本語はこちら

Overview

 This application is used to mount the directory to which ssh connection is made on a linux system.

Install [cargo].

  • Prepare a development environment for rust. Install Rust
  • Run "cargo install sshmount".

install [manual].

  • Prepare a development environment for Rust. Install Rust
  • Clone the repository.
  • In the cloned directory, execute "cargo build --release".
  • Copy "target/release/sshmount" to an appropriate directory and execute it directly.

Usage.

Mount the directory to which the ssh connection is made.

Usage: sshmount [OPTIONS] <REMOTE> <MOUNT_POINT>

Arguments:
  <REMOTE>       Distination [user@]host:[path]
  <MOUNT_POINT>  Path to mount

Options:
  -F, --config-file <CONFIG_FILE>  Path to config file
  -l, --login-name <LOGIN_NAME>    Login name
  -i, --identity <IDENTITY>        File name of secret key file
  -p, --port <PORT>                Port no [default: 22]
  -r, --readonly                   Read only
      --no-exec                    Not executable
      --no-atime                   Do not change access date and time(atime)
  -d, --daemon                     run in daemon mode
  -h, --help                       Print help
  -V, --version                    Print version

  • The console will be blocked during execution, so either run it in daemon mode with the -d option, or run it in the background with "&" appended to the end, or work on a separate console.
  • If you no longer need it after mounting, dismount it with "umount <MOUNT_POINT>".
    • If you force sshmount to terminate, for example by closing the console on which sshmount is running, a halfway mounted state will remain. In this case, please use "umount <MOUNT_POINT>" to dismount.
  • As for the config file, it conforms to ssh. The default is "$HOME/.ssh/config".
  • Please prepare an empty directory for the mount destination directory.
  • As for symbolic links in remote directories, those that go through directories higher than the mount point cannot refer to the link destination.
    • If an absolute path is specified, it always goes through the root, so it cannot be referenced except when the root is mounted.
    • If a path that is also valid on the local side is used as the link destination, the file on the local side is referenced.
  • This utility can be run with user privileges. (no sudo required)
    • When run with sudo, it will attempt to log in remotely as root when connecting as the default user.
  • The user and group names of the files in the mounted directory will be displayed as the user and group names on the local side. Note, however, that > and permission checks are performed with the user name on the remote side that you specified when connecting.

License.

 Conforms to the Apache License 2.0.

Dependencies

~8–20MB
~226K SLoC