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 15:26] – hogwild | router_to_router_ssh [2023/05/24 02:08] (current) – [Notes] -changed subhead to "Passwordless Router-to-Router SSH Notes" hogwild | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Overview ===== | ===== Overview ===== | ||
- | This setup allows a primary router, (the "SSH Client" | + | This setup allows a primary router, (the "SSH Client" |
- | FreshTomato includes [[https:// | + | FreshTomato includes [[https:// |
- | * When the the secondary router system | + | * When the the secondary router system |
- | * For running scripts on the secondary router | + | * For running scripts on the secondary router |
+ | * As seen below, for switching wireless radio(s) on or off on a schedule (not shown). | ||
- | As seen below, for switching wireless radio(s) on or off to a schedule (not shown). | + | ===== Setting up/ |
- | - On the primary router (the one issuing SSH commands) type the command: \\ **dropbearkey -t rsa -f ~/ | + | 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: \\ " |
+ | - Copy the Public key portion from the primary router and paste it into the “Authorized Keys” field in secondary router: \\ \\ {{: | ||
+ | - In the above screenshot, a pre-existing, | ||
+ | - Now, connect to the secondary router via an SSH session (running on the primary router). | ||
- | \\ \\ | + | \\ |
- | - Copy and paste the Public key portion from the primary router | + | \\ |
- | \\ {{: | ||
- | Note that a pre-existing, | + | ===== Usage Example ===== |
- | - Now, connect to the secondary router from within an SSH session (running | + | This example will enable/ |
- | \\ {{: | + | - This screenshot shows the status display of the Primary router before before the command is run: \\ \\ {{: |
- | + | - Now, we run the command | |
- | ==== Example ==== | + | - This shows the status display |
- | + | ||
- | This example will enable/ | + | |
- | + | ||
- | - This shows the status display | + | |
\\ | \\ | ||
- | - Here, the command (**ssh root@192.168.10.1 radio toggle 1**) executed:\\ {{: | + | \\ |
- | + | ||
- | - And here is the status display after the command is run. | + | |
- | {{: | ||
- | ===== Notes ===== | + | ===== Passwordless Router-to-Router SSH Notes ===== |
- | * SSH must be enabled on both routers. | + | * The SSH daemon |
- | * The key generated will be erased after a reboot of the primary | + | * The key generated will be erased after a reboot of the Primary |
+ | * 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. | ||
* This guide was produced using [[https:// | * This guide was produced using [[https:// | ||
* Inspiration was provided by [[https:// | * Inspiration was provided by [[https:// |