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/21 19:54] – [HOWTO] hogwild | router_to_router_ssh [2023/05/24 02:08] (current) – [Notes] -changed subhead to "Passwordless Router-to-Router SSH Notes" 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 ===== | + | * 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). | ||
- | - On the primary router (the one issuing SSH commands) type the command: \\ **dropbearkey -t rsa -f ~/.ssh/ | + | ===== Setting up/Establishing |
- | \\ {{: | + | 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 \\ to the secondary router’s “Authorized Keys” field, as seen below: | ||
- | |||
- | \\ {{: | ||
- | |||
- | 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 is executed locally [**nvram get lan_hostname**]. | ||
- | \\ {{: | ||
- | ==== Example ==== | + | ===== Usage Example |
+ | This example will enable/ | ||
- | Enable/ | + | - This screenshot shows the status display of the Primary |
+ | - Now, we run the command (//ssh root@192.168.10.1 | ||
+ | - This shows the status display after the command | ||
- | \\ 01 - Status before [Primary router]. | + | \\ |
- | \\ {{: | + | \\ |
- | + | ||
- | \\ 02 - Command [**ssh root@192.168.10.1 radio toggle 1**] executed. | + | |
- | + | ||
- | \\ {{: | + | |
- | + | ||
- | \\ 03 - Status after. | + | |
- | + | ||
- | \\ {{: | + | |
- | [If the same command is repeated, eth1 will be switched *Off on the primary router.] | ||
- | \\ **Notes** | + | ===== Passwordless Router-to-Router SSH Notes ===== |
- | \\ SSH must be enabled on both routers. | + | * The SSH daemon |
+ | * The key generated | ||
+ | * Either keep a copy of the "id_dropbear" | ||
+ | * Be prepared to repeat | ||
+ | * This guide was produced using [[https:// | ||
+ | * Inspiration | ||
+ | * The process was first documented [[https:// | ||