This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| deb10:raspi [2021/04/27 18:33] – [Remote location] Bernard Condrau | deb10:raspi [2026/03/02 14:44] (current) – [Raspian 10] Bernard Condrau | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Raspian 10 ====== | + | ====== Raspian 10 (buster) |
| ===== Prepare SD card ===== | ===== Prepare SD card ===== | ||
| - | * Download and install the [[https:// | + | * Download and install the [[https:// |
| * Copy " | * Copy " | ||
| Line 15: | Line 15: | ||
| ===== Install AutoSSH ===== | ===== Install AutoSSH ===== | ||
| - | Install AutoSSH on a **remote_host** to connect to my main server (**local_host**) to allow connections from **any_host** (either at the local location, | + | Install AutoSSH on a **remote_host** to connect to a **local_host** to allow connections from this **local_host** or **any_host** from any (other) location. |
| - | ==== Remote location | + | ==== Setup remote_host |
| - Verify access from local_host and any_host: SSH from **remote_host** to **local_host**:< | - Verify access from local_host and any_host: SSH from **remote_host** to **local_host**:< | ||
| - Once confirmed, create file // | - Once confirmed, create file // | ||
| Line 29: | Line 29: | ||
| [Install] | [Install] | ||
| WantedBy=multi-user.target</ | WantedBy=multi-user.target</ | ||
| + | - Once we have the service file created start the service and enable it to run at boot:< | ||
| + | remote_host$ sudo systemctl start autossh-tunnel.service | ||
| + | remote_host$ sudo systemctl enable autossh-tunnel.service</ | ||
| + | - Trouble shoot:< | ||
| + | ==== Connect from local_host ==== | ||
| + | - SSH from **local_host** to **remote_host** through tunnel at < | ||
| - | ==== Local location ==== | + | ==== Connect |
| - | - Verify: SSH from **local_host** to **remote_host** through tunnel at < | + | - SSH to **local_host** and establish tunnel from (any_host) < |
| - | + | - SSH from any_host to localhost:< | |
| - | ==== Any location | + | |
| - | - Verify: | + | |
| - | - Verify: | + | |
| + | ==== Connect to other services at remote location ==== | ||
| + | Connections from any location cannot tunnel to other services on the remote network directly. Instead, we can open a (temporary) tunnel to any host on the remote network and add a tunnel to the same port to the connection from any_host to local_host. | ||
| + | - Login to remote_host, | ||
| + | - SSH to **local_host** and establish tunnel from (any_host) < | ||
| + | - Connect from any_host to localhost:< | ||
| + | - Example: to access a https website on remote host 192.168.1.1, | ||
| ==== Links ==== | ==== Links ==== | ||
| * [[https:// | * [[https:// | ||