This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
router_to_router_ssh [2021/09/22 01:36] – [Example] hogwild | router_to_router_ssh [2024/10/31 22:39] (current) – [Setting up/Establishing a Tunnel] hogwild | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Enable | + | ====== Enable Password-less Router-to-Router SSH Encryption ====== |
===== Overview ===== | ===== Overview ===== | ||
- | FreshTomato includes [[https:// | + | This setup allows |
+ | FreshTomato includes [[https:// | ||
- | ===== HOWTO ===== | + | \\ |
- | | + | |
+ | | ||
+ | * 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: |
- | - Copy and paste the Public key portion from the primary router \\ to the secondary router’s | + | |
+ | | ||
+ | - In the above screenshot, a pre-existing, | ||
+ | - Now, connect to the secondary router via SSH (running on the primary router). | ||
- | \\ {{: | + | \\ |
- | Note that a pre-existing, | + | \\ |
- | \\ | + | |
- | \\ | + | |
- | - Now, connect to the secondary router from within an SSH session (running on the primary router). The example below uses the **nvram** command to display the host name. The first command string (**ssh root@192.168.10.1 nvram get lan_hostname) **executes the command on the secondary router and then it [nvram get lan_hostname] is executed locally, on the primary router. | + | |
- | \\ {{: | + | \\ |
- | ==== Example ==== | + | ===== Usage Example |
- | This example | + | This example |
- | \\ | + | |
- | \\ | + | - This screenshot |
- | - This shows the status display before ([Primary router) the command is run.\\ {{: | + | - Now, we run the command ("//ssh root@192.168.10.1 radio toggle 1"//): \\ \\ {{: |
- | \\ | + | - This shows the status after the command is run: \\ \\ {{: |
- | - Command [**ssh root@192.168.10.1 radio toggle 1**] executed.\\ {{: | + | |
- | \\ | + | \\ Since "radio toggle 1" is a toggle switch, if the same command is repeated, the eth1 interface will be disabled on the primary router. |
- | | + | |
- | \\ {{: | ||
\\ | \\ | ||
- | \\ | ||
- | (If the same command is repeated, eth1 will be disabled on the primary router.) | ||
- | \\ **Notes** | + | \\ |
+ | |||
+ | ===== Passwordless Router-to-Router SSH Notes ===== | ||
+ | |||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | |||
+ | This guide was produced using [[https:// | ||
+ | |||
+ | | ||
+ | |||
+ | \\ | ||
- | \\ SSH must be enabled on both routers. \\ The key generated is not preserved across a reboot of the [primary] router. Either keep a copy of the id_dropbear file offline [on a UFD or “CIFS Client” share] for restoration, | + | \\ |