- Bash
- jq
- sshfs
- Tailscale (optional; but will return error if used)
Note
I plan to write an install script for this in the future, but it's not a high priority right now.
-
Make and move to your install directory (replace
/your/install/path, and replacemkcdwith the commandsmkdirandcdif not installed)mkcd /your/install/path/mountSSH
-
Download the script and config json
curl -O https://raw.githubusercontent.com/Supraboy981322/mountSSH/main/src/mountSSH.bash
then
curl -O https://raw.githubusercontent.com/Supraboy981322/mountSSH/main/src/machines.json
-
Make mountSSH.bash executable (may require
su)chmod a+x mountSSH.bash
-
In order to run the script from anywhere, there are two options:
-
Create system alias (may require
su, replace/your/install/path)echo 'alias mountSSH="/your/install/path/mountSSH/mountSSH.bash"' >> /etc/bash.bashrc
-
OR, add mountSSH install directory to system path (may require
su, replace/your/install/path)echo 'PATH="$PATH:/your/install/path/mountSSH/"' >> /etc/bash.bashrc
-
-
OPTIONAL (recommended): rename
mountSSH.bashtomountSSHmv mountSSH.bash mountSSH
-
Help
mountSSH -h -
Version
mountSSH -v
-
User (replace
[your user])mountSSH -u [your user]
-
Remote machine (replace
remote machine)mountSSH -m [remote machine]
-
Remote directory (replace
/remote/dir)mountSSH -r /remote/dir
-
Local mount directory (replace
/local/dir)mountSSh -l /local/dir
-
IP address (replace
192.168.5.37with your remote machine's IP address)mountSSH -i 192.168.5.37
-
To mount the remote directory "/foo/bar" on a machine named "baz" as the user "qux" to the local directory "quux" (in the directory your user is currently located):
mountSSH -r /foo/bar -m baz -u qux -l quux
-
If your local user is "foo", to mount the remote directory "/home/foo" on a remote machine named "bar" as the user "foo" to a local directory "bar" (which is located in your current directory)
mountSSH -m bar
-
Assuming your local user is "foo", to mount the remote directory "/home/foo" on the machine "bar" with the ip address "47.93.14.33"
mountSSH -m bar -i 47.93.14.33