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 17:33] – [Example] -change to subhead1-condense, formatting-make numbering continguous hogwild | router_to_router_ssh [2023/05/24 02:08] (current) – [Notes] -changed subhead to "Passwordless Router-to-Router SSH Notes" hogwild | ||
---|---|---|---|
Line 11: | Line 11: | ||
* 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 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 by typing the command: \\ " |
- | - 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 into the “Authorized Keys” field in secondary router: \\ \\ {{: |
- | - Note that a pre-existing, | + | - In the above screenshot, |
- | - Now, connect to the secondary router via an SSH session (running on the primary router). The example below uses the //nvram// command to display the hostname. The first command string ("ssh root@192.168.10.1 nvram get lan_hostname" | + | - Now, connect to the secondary router via an SSH session (running on the primary router). |
- | ===== Example ===== | + | \\ |
+ | |||
+ | \\ | ||
+ | |||
+ | |||
+ | ===== Usage Example ===== | ||
This example will enable/ | This example will enable/ | ||
- | - This screenshot shows the status display of the Primary router before before the command is run: \\ \\ {{: | + | - This screenshot shows the status display of the Primary router before before the command is run: \\ \\ {{: |
- | - Now, we run execute | + | - Now, we run the command (//ssh root@192.168.10.1 radio toggle 1//): \\ \\ {{: |
- | - This shows the status display after the command is run. \\ {{: | + | - This shows 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 " | * Either keep a copy of the " | ||
- | * Be prepared to repeat | + | * 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:// |