https://github.com/b1f6c1c4/remote-exec

Run command on remote machine using sshfs

https://github.com/b1f6c1c4/remote-exec

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.0%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Run command on remote machine using sshfs

Basic Info
  • Host: GitHub
  • Owner: b1f6c1c4
  • License: mit
  • Language: Shell
  • Default Branch: master
  • Homepage:
  • Size: 8.79 KB
Statistics
  • Stars: 6
  • Watchers: 2
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created almost 6 years ago · Last pushed over 5 years ago
Metadata Files
Readme License

README.md

, and ,,: Run commands on remote server with sshfs

Overview

  • ,: Run commands on remote server with all files stored remotely
    • Pros: Remote commands access files without networking, reducing latency
    • Pros: Save huge disk space on your local machine.
    • Cons: If the remote machine is down, you cannot work at all.
    • Cons: Cannot switch among multiple remote machines easily.
    • Cons: During setup, you need to manually transfer all your data.
    • Use this mode when: Compile gcc, llvm, Linux kernel, etc.
  • ,,: Run commands on remote server with all files stored locally
    • Pros: Setup is instant and does not involve any data movement.
    • Pros: You can still work locally when the remote machine is down.
    • Pros: You can easily switch among multiple remote machines.
    • Cons: Remote commands access files through networking, increasing latency
    • Cons: Higher disk usage on local machine.
    • Cons: Local commands access files through internet, increasing latency
    • Use this mode when: Unit testing your own work.

Note: You need sshfs installed on both machine.

Usage - ,

  1. On your local machine, create an empty folder called magic:

    bash mkdir magic

  2. Create a config file in the folder:

    bash echo 'RMT_HOST=<user>@<host>' > magic/.rmt-config

  3. Make the magic folder magic by:

    bash . , magic

  4. Now you can operate on the folder from both side in one single shell:

    bash vim Makefile # Edit files using local machine , make -j64 # Run heavy jobs using remote machine Note: Files are stored remotely but is visible locally thanks to sshfs.

  5. You can of course launch a remote shell like ssh:

    bash ,

  6. To stop the magic:

    bash . , Note: Files are still stored on the remote machine.

  7. To get the files back, simply type . , magic again.

Usage - ,,

  1. Inside a non-empty folder, create a config file in the folder:

    bash echo 'RMT_HOST=<user>@<host>' > magic/.rmt-config

  2. Now you can operate on the folder from both side in one single shell:

    bash ,, make -j64 # Run heavy jobs using remote machine Note: Files are stored remotely but is visible locally thanks to sshfs.

  3. You can of course launch a remote shell like ssh:

    bash ,,

  4. To stop:

    bash ,, , Note: Files are still stored on the local machine.

Configuration: .rmt-config

  • RMT_HOST: (Required) The remote machine.
  • RMT_LOCALHOST: (Required for ,,) The local machine.
  • RMT_SSH: (Optional) To override the command line for ssh. Default is ssh -Y -t.
  • RMT_SSHFS: (Optional) To override the command line for sshfs, Default is sshfs.
  • RMT_RENV: (Optional) Will be added to the command line of /usr/bin/env during ssh call.
  • RMT_RSHELL: (Optional) To override the login shell on remote machine. Default is to be automatically detected.
  • RMT_RDIR: (Optional) To specify where to store the files on remote machine. A path relative to $HOME. Default is .rmt/.

Limitation

Quotation and escape is a mess. If your command contains $, escape carefully. There's absolutely no gurantee that any kind of escape will or will not work. If you want to run any command containing &&, ||, or |, use the remote shell by typing , alone.

License

MIT

Owner

  • Login: b1f6c1c4
  • Kind: user
  • Location: NJ, USA
  • Company: Princeton University

52BE D143 A92D BE96 2B83 092B 9BAC 0164 9600 1E70

GitHub Events

Total
Last Year

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 9
  • Total Committers: 1
  • Avg Commits per committer: 9.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
b1f6c1c4 b****4@g****m 9

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • b1f6c1c4 (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels