SSH Port Forwarding:Configuration: Difference between revisions
Appearance
Minor update - configuration guide: SSH Port Forwarding Configuration (6 sections) (configuration) |
Content added - configuration guide: SSH Port Forwarding Configuration (8 sections) (configuration) |
||
| Line 1: | Line 1: | ||
This document describes the configuration file format for SSH port forwarding. | This document describes the configuration file format for SSH port forwarding. | ||
| Line 38: | Line 36: | ||
<pre class="lang-bash"> | <pre class="lang-bash"> | ||
= Edit config file = | === Edit config file === | ||
sudo nano /etc/ssh-port-forwards.conf | sudo nano /etc/ssh-port-forwards.conf | ||
= Apply changes = | == Apply changes == | ||
sudo ssh-forward apply | sudo ssh-forward apply | ||
</pre> | </pre> | ||
Latest revision as of 13:44, 1 January 2026
This document describes the configuration file format for SSH port forwarding.
Configuration File Format
[edit]The configuration file /etc/ssh-port-forwards.conf uses a simple format:
DEVICE_NAME:EXTERNAL_PORT:VPN_IP:SSH_PORT
Example
[edit]synology:22222:10.8.0.2:22 raspberrypi:22223:10.8.0.3:22 server:22224:10.8.0.4:22
Fields
[edit]- DEVICE_NAME: A descriptive name for the device (e.g.,
synology,raspberrypi)
- EXTERNAL_PORT: The port on the VPS that will receive SSH connections (e.g.,
22222)
- VPN_IP: The IP address of the device on the VPN network (e.g.,
10.8.0.2)
- SSH_PORT: The SSH port on the target device (default:
22)
Comments
[edit]Lines starting with # are treated as comments and ignored.
Manual Configuration File Editing
[edit]You can manually edit /etc/ssh-port-forwards.conf and then apply:
=== Edit config file === sudo nano /etc/ssh-port-forwards.conf == Apply changes == sudo ssh-forward apply
Related Documentation
[edit]- [[Documentation:Overview](Overview|- System architecture
- [Management]])(management.md) - Managing port forwards