Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-quick-start:sshadministration [2020/02/08 02:54] – Update Win10 Powershell info richb-hanover | docs:guide-quick-start:sshadministration [2022/08/05 18:08] – [Windows terminal emulators] added external link and cleanup palebloodsky | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======SSH | + | ====== SSH access |
| - | A OpenWrt | + | One of the methods to manage OpenWrt is using [[docs: |
| + | OpenWrt listens for incoming | ||
| + | To "ssh into your router", | ||
| + | |||
| + | <code bash> | ||
| + | ssh root@192.168.1.1 | ||
| + | </ | ||
| + | |||
| + | The first time you ssh into your router, you will probably see a warning about the //RSA key fingerprint// | ||
| + | If you are certain this is the address of your OpenWrt device, simply type '' | ||
| + | Then enter the password you have given to your router, or press Return if this is the initial setup. | ||
| + | Here is an example session: | ||
| - | The first time you ssh into your router, you will probably see a warning about the //RSA key fingerprint// | ||
| < | < | ||
| - | $ ssh root@192.168.1.1 | + | $ ssh root@192.168.1.1 |
| The authenticity of host ' | The authenticity of host ' | ||
| RSA key fingerprint is SHA256: | RSA key fingerprint is SHA256: | ||
| - | Are you sure you want to continue connecting (yes/no)? yes <== and this | + | Are you sure you want to continue connecting (yes/no)? yes <== and this |
| Warning: Permanently added ' | Warning: Permanently added ' | ||
| - | root@192.168.1.1' | + | root@192.168.1.1' |
| BusyBox v1.28.4 () built-in shell (ash) | BusyBox v1.28.4 () built-in shell (ash) | ||
| Line 22: | Line 32: | ||
| | | ||
| - | root@OpenWrt: | + | root@OpenWrt: |
| </ | </ | ||
| Line 28: | Line 38: | ||
| The remainder of this page describes several terminal emulators that Windows, Linux, or macOS can use to access your OpenWrt device. | The remainder of this page describes several terminal emulators that Windows, Linux, or macOS can use to access your OpenWrt device. | ||
| - | =====Windows Terminal Emulators===== | ||
| - | Win10 Powershell, Cmder, Smartty, Putty, and WinSCP are terminal emulators that allow you to ssh into a router. | ||
| - | ====Using Win10 Powershell===== | + | //Note: To add a SSH public key to your OpenWrt device, see [[: |
| + | ===== Windows terminal emulators | ||
| + | [[https:// | ||
| - | Win10 Powershell (finally) provides | + | ==== Windows 10 built-in terminals ==== |
| + | Both Windows PowerShell and Command Prompt allows using the default Windows 10 SSH client. | ||
| + | That SSH client is an optional windows | ||
| - | ====Using Cmder===== | + | If you have installed a WSL distribution, |
| - | **Cmder for Windows** is an open-source terminal emulator that runs on Windows. It is free to use and provides an easy " | + | |
| - | - Download cmder from [[https://cmder.net/]] | + | If you directly launch '' |
| - | - Unzip the // | + | Otherwise, you can install the modern |
| - | - Open the Cmder folder, | + | |
| - | - To ssh into the OpenWrt router at 192.168.1.1, | + | |
| - | {{: | + | |
| - | ====Using Smartty==== | + | - Open any of the above terminal emulators and write '' |
| - | Smartty gives you command | + | - there will be a message about accepting a new key from the OpenWrt |
| + | - If for some reason you have reinstalled OpenWrt the device will have a different key and you get an error about key mismatch. The error will state what is the command line to copy-paste in your terminal to delete the old key and proceed. Do it and retry. | ||
| + | | ||
| - | - Download Smartty from [[http://sysprogs.com/SmarTTY/]]: choose " | + | The Windows 10 optional SSH feature also includes SCP client (to open/edit/download/upload files in OpenWrt via SSH). |
| - | - after installation or after unzipping the archive, doubleclick on **SmarTTY** executable file. | + | Try google |
| - | - You will be greeted by a window with two choices, doubleclick on "setup a new SSH connection" | + | Otherwise, use [[docs:guide-quick-start:sshadministration# |
| - | - The window changes into the SSH setup, write the following info: | + | |
| - | | + | ==== PowerShell ==== |
| - | - **User Name:** **root** (this is the " | + | [[https://devblogs.microsoft.com/powershell/announcing-PowerShell-7-0/ |
| - | - **Password:** leave this blank for your first connection, then write the password you set up (either in Luci GUI or after your first SSH access) | + | |
| - | - Click " | + | ==== Windows Subsystem |
| - | - A default OpenWrt firmware lacks the server component to allow you to open/edit/view/upoad/download files in Smartty, so after you have connected to the internet write '' | + | The Windows Subsystem for Linux is a convenient way to run a Linux environment |
| - | - Now you can click on **File -> Open a Remote File** | + | |
| - | - If you want to upload or download files to/from a specific folder in the device, you can click on SCP menu and choose the most appropriate action from there. | + | |
| - | After the first time you connected to a device, Smartty saved a profile, so you can connect again to the same device (at that IP address with that password) by just doubleclicking its icon on the first window you see when starting Smartty. You can right-click on this profile icon to edit it again, if needed. | + | ==== PuTTY ==== |
| + | PuTTY gives you command-line access | ||
| - | ====Using putty==== | + | |
| - | Putty gives you command line access to OpenWrt: | + | - Start '' |
| - | | + | - go to the '' |
| - | - Start '' | + | |
| - | - go to the '' | + | |
| - Click the '' | - Click the '' | ||
| - Done, you are logged into the OpenWrt command line. | - Done, you are logged into the OpenWrt command line. | ||
| + | Setting up key-based authentication. | ||
| - | ====Using WinSCP==== | + | - Generate a key pair using '' |
| - | WinSCP allows you to browse the OpenWrt file system in Windows Exlorer like GUI-style: | + | - Connection -> SSH -> Auth: In the box " |
| - | - Download | + | |
| + | Automating connections. | ||
| + | |||
| + | - Connection -> Data: In the box "Login details" | ||
| + | - Load, save or delete a stored session, enter '' | ||
| + | - To make a PuTTY shortcut with an automatic login, create one and append the saved session with an '' | ||
| + | |||
| + | ==== WinSCP ==== | ||
| + | WinSCP allows you to browse the OpenWrt file system in Windows Exlorer like GUI-style. | ||
| + | |||
| + | - Download [[https:// | ||
| - Start '' | - Start '' | ||
| - | - Click on '' | + | - Click on '' |
| - Click the '' | - Click the '' | ||
| - | - Done. You now have an Exlorer-like view of your OpenWrt | + | - Done. You now have an Exlorer-like view of your OpenWrt |
| - | **Editing OpenWrt config files with WINSCP's integrated GUI editor:**\\ | + | Editing OpenWrt config files with WinSCP's integrated GUI editor. |
| - | To edit a OpenWrt config file with WinSCP' | + | |
| - | =====Linux | + | - To edit an OpenWrt config file with WinSCP' |
| + | |||
| + | ==== Cmder ==== | ||
| + | Cmder for Windows is an open-source terminal emulator that runs on Windows. | ||
| + | It is free to use and provides an easy " | ||
| + | Its attractive fonts and color scheme are easy on the eyes. | ||
| + | The //Full// distribution is preferred (over the //mini// distribution), | ||
| + | |||
| + | - Download [[https:// | ||
| + | - Unzip the // | ||
| + | - Open the Cmder folder, and double-click the Cmder icon. You'll see a Cmder window open similar to the image below. | ||
| + | - To ssh into the OpenWrt router at 192.168.1.1, | ||
| + | |||
| + | ==== SmarTTY ==== | ||
| + | SmarTTY gives you command line access to OpenWrt and allows you to open/ | ||
| + | |||
| + | - Download [[http:// | ||
| + | - after installation or after unzipping the archive, doubleclick on **SmarTTY** executable file. | ||
| + | - You will be greeted by a window with two choices, doubleclick on "setup a new SSH connection" | ||
| + | - The window changes into the SSH setup, write the following info: | ||
| + | - **Host name:** OpenWrt device IP address (default is **192.168.1.1** ) | ||
| + | - **User Name:** **root** (this is the " | ||
| + | - **Password: | ||
| + | - Click " | ||
| + | - A default OpenWrt firmware lacks the server component to allow you to open/ | ||
| + | - Now you can click on **File -> Open a Remote File** to open a popup that shows the file system of the OpenWrt device, and you can navigate in it and open text files for example as normal (they will open in a SmarTTY text editor window) | ||
| + | - If you want to upload or download files to/from a specific folder in the device, you can click on SCP menu and choose the most appropriate action from there. | ||
| + | |||
| + | After the first time you connected to a device, SmarTTY saved a profile, so you can connect again to the same device (at that IP address with that password) by just doubleclicking its icon on the first window you see when starting SmarTTY. | ||
| + | You can right-click on this profile icon to edit it again, if needed. | ||
| + | |||
| + | ===== Linux terminal emulators | ||
| All Linux distributions provide a command-line ssh client as part of the default installation. | All Linux distributions provide a command-line ssh client as part of the default installation. | ||
| Line 89: | Line 137: | ||
| - if you want to close the session, write " | - if you want to close the session, write " | ||
| - | Linux also usually has SCP clients (to open/ | + | Linux also usually has SCP/SFTP clients (to open/ |
| - | Read its integrated manual ("man scp" for example is for the command line SCP client) or google some tutorials to learn how to use it. | + | You need to look up your distro' |
| + | Read [[man>scp|scp manual]] | ||
| + | |||
| + | ==== Midnight Commander ==== | ||
| + | [[https:// | ||
| + | You can access remote files on OpenWrt via mc: | ||
| + | |||
| + | - Press ' | ||
| + | - Select ' | ||
| + | - Select 'Shell link' | ||
| + | - Input ' | ||
| + | - Now you'll see list of files and directories in root of OpenWrt | ||
| + | |||
| + | Internally it works over [[wp> | ||
| + | |||
| + | ===== macOS terminal emulators ===== | ||
| + | On macOS (formerly Mac OSX) any terminal emulator will allow you to ssh. | ||
| + | |||
| + | - Terminal - The macOS built-in terminal program, find it in / | ||
| + | - [[https:// | ||
| - | =====macOS Terminal Emulators ===== | + | To ssh into your OpenWrt router at 192.168.1.1, |
| - | On macOS (formerly Mac OSX) any terminal emulator will allow you to ssh. There several terminal emulators: | + | |
| - | - Terminal - The macOS built-in | + | ===== Chrome OS terminal |
| - | - iTerm2 | + | On Chrome OS, [[https://chrome.google.com/webstore/ |
| - | To ssh into your OpenWrt router at 192.168.1.1, | ||