This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
router_to_router_ssh [2023/05/23 18:03] – [Example] -changed subhead to "Usage example" hogwild | router_to_router_ssh [2024/10/31 22:39] (current) – [Setting up/Establishing a Tunnel] hogwild | ||
---|---|---|---|
Line 6: | Line 6: | ||
FreshTomato includes [[https:// | FreshTomato includes [[https:// | ||
- | |||
- | * When the the secondary router system doesn' | ||
- | * For running scripts on the secondary router using any supported commands. | ||
- | * As seen below, for switching wireless radio(s) on or off on a schedule (not shown). | ||
\\ | \\ | ||
+ | |||
+ | * When the the secondary router system doesn' | ||
+ | * For running scripts on the secondary router using supported commands. | ||
+ | * As seen below, for switching wireless radio(s) on/off on a schedule (not shown). | ||
+ | |||
+ | ===== Setting up/ | ||
Follow these steps to generate a Keypair and establish an SSH tunnel: | Follow these steps to generate a Keypair and establish an SSH tunnel: | ||
- | - On the primary router (the one issuing SSH commands) generate a Keypair by typing the command: | + | - On the primary router (the one issuing SSH commands) generate a Keypair |
- | - Copy the Public key portion from the primary router and paste it into the “Authorized Keys” field in secondary router: \\ \\ {{: | + | - Copy the Public key portion from the primary router and paste it |
- In the above screenshot, a pre-existing, | - In the above screenshot, a pre-existing, | ||
- | - Now, connect to the secondary router via an SSH session | + | - Now, connect to the secondary router via SSH (running on the primary router). |
+ | |||
+ | \\ | ||
\\ | \\ | ||
Line 27: | Line 31: | ||
===== Usage Example ===== | ===== Usage Example ===== | ||
- | This example | + | This example |
- | - This screenshot shows the status display of the Primary router | + | - This screenshot shows the Primary router's status |
- | - Now, we run the command (//ssh root@192.168.10.1 radio toggle 1//): \\ \\ {{: | + | - Now, we run the command ("//ssh root@192.168.10.1 radio toggle 1"//): \\ \\ {{: |
- | - This shows the status | + | - This shows the status after the command is run: \\ \\ {{: |
+ | |||
+ | \\ Since "radio toggle 1" is a toggle switch, if the same command is repeated, the eth1 interface will be disabled on the primary router. | ||
\\ | \\ | ||
Line 37: | Line 43: | ||
\\ | \\ | ||
- | + | ===== Passwordless Router-to-Router SSH Notes ===== | |
- | ===== Notes ===== | + | |
* The SSH daemon must be enabled on both routers. | * The SSH daemon must be enabled on both routers. | ||
* The key generated will be erased after a reboot of the Primary router. | * The key generated will be erased after a reboot of the Primary router. | ||
- | * Either keep a copy of the " | + | * Either keep a copy of the " |
- | * Be prepared to repeat (steps 1. and 2.) after a reboot, removing any redundant key from the secondary router. | + | * Be prepared to repeat (steps 1. and 2.) after a reboot, |
- | | + | |
- | | + | This guide was produced using [[https:// |
- | * The process was first documented [[https:// | + | |
+ | Inspiration was provided by [[https:// | ||
+ | |||
+ | \\ | ||
+ | |||
+ | \\ | ||