Initial commit

This commit is contained in:
2025-09-14 11:29:21 +02:00
commit d510d777ca
12 changed files with 1246 additions and 0 deletions

81
man/backtunnel.1 Normal file
View File

@@ -0,0 +1,81 @@
.TH backtunnel 1 "September 2025" "1.1" "BackTunnel Reverse SSH Sharing Toolkit"
.SH NAME
backtunnel-share, backtunnel-access \- Secure reverse SSH folder sharing and access
.SH SYNOPSIS
.B backtunnel-share
/path/to/folder with remoteuser:remotehost for <duration> [options]
.B backtunnel-access
/path/to/folder from remoteuser:remotehost [options]
.SH DESCRIPTION
\fBbacktunnel-share\fR starts a reverse SSH tunnel from the local (sharing) machine to a remote, reachable host.
The tunnel exposes the local sshd (typically port 22) on a loopback port on the remote host using \fBssh -R\fR.
The sharing ends automatically after the given \fIduration\fR via \fBtimeout\fR.
\fBbacktunnel-access\fR mounts the shared folder from the remote side using \fBsshfs\fR by connecting to \fBlocalhost:<port>\fR on the remote host (the port exposed by \fBbacktunnel-share\fR).
.SH OPTIONS
.SS backtunnel-share options
.TP
.B -p, --tunnel-port <PORT>
Remote port to bind with \fB-R\fR (default: 2222).
.TP
.B -l, --local-ssh-port <PORT>
Local sshd port to forward to (default: 22).
.SS backtunnel-access options
.TP
.B -p, --port <PORT>
Remote port on which the reverse tunnel listens (default: 2222).
.TP
.B -m, --mount-point <PATH>
Local mount point for sshfs (default: /mnt/remote-rssh).
.SH ARGUMENTS
.TP
.B /path/to/folder
Path to share (server) or to mount (client).
.TP
.B remoteuser:remotehost
Or \fBremoteuser@remotehost\fR. The remote host that accepts the initial SSH connection.
.TP
.B <duration>
Time to keep the share active. Accepts \fBn\fR\fIs\fR|\fIm\fR|\fIh\fR|\fId\fR forms, e.g. 30m, 2h, 1d. Passed to \fBtimeout\fR.
.SH EXAMPLES
.TP
Share for 2 hours on default ports:
.B backtunnel-share
/home/user/docs with alice@vps.example.com for 2h
.TP
Share for 1 day, using custom ports:
.B backtunnel-share
/home/user/docs with alice:vps.example.com for 1d -p 4422 -l 2222
.TP
Mount with default port and mount point:
.B backtunnel-access
/home/user/docs from alice@vps.example.com
.TP
Mount with custom port and mount point:
.B backtunnel-access
/home/user/docs from alice@vps.example.com -p 4422 -m /mnt/alice-docs
.SH NOTES
By default, \fBssh -R\fR binds to 127.0.0.1 on the remote side, limiting access to local users on the remote machine.
The client connects to \fBlocalhost:<port>\fR from the remote host.
.SH SEE ALSO
ssh(1), sshfs(1), timeout(1), autossh(1), fusermount(1)
.SH AUTHOR
Matjaž Mozetič