A OpenWrt device, by default, always listens for SSH command line access on port 22. To “ssh into your router”, you enter the command
ssh email@example.com in a terminal emulator (for a router whose address is 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
yes and press Return. Then enter the password you have given to your router, or press Return if this is the initial setup. Here is an example session:
$ ssh firstname.lastname@example.org <== You type this The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established. RSA key fingerprint is SHA256:4VbDA/MOc7inPiyllF5f0r3Q6iEx89ddKdhLGBovsiY. Are you sure you want to continue connecting (yes/no)? yes <== and this Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts. email@example.com's password: <== and the password here BusyBox v1.25.1 () built-in shell (ash) _________ / /\ _ ___ ___ ___ / LE / \ | | | __| \| __| / DE / \ | |__| _|| |) | _| /________/ LE \ |____|___|___/|___| lede-project.org \ \ DE / \ LE \ / ----------------------------------------------------------- \ DE \ / Reboot (17.01.2, r3435-65eec8bd5f) \________\/ ----------------------------------------------------------- root@LEDE:~# <== type next command here
To end your ssh session to your router, type
exit and press Return.
The remainder of this page describes several terminal emulators that Windows, Linux, or macOS can use to access your OpenWrt device.
Cmder, Smartty, Putty, and WinSCP are terminal emulators that allow you to ssh into a router.
As of April 2018, Win10 Powershell and command prompt provide SSH access after enabling the feature. Here's a description of the process: https://www.howtogeek.com/336775/how-to-enable-and-use-windows-10s-built-in-ssh-commands/
Cmder for Windows is an open-source terminal emulator that runs on Windows. It is free to use and provides an easy “command line shell” that allows you to ssh into OpenWrt. Its attractive fonts and color scheme are easy on the eyes. The Full distribution is preferred (over the mini distribution), since it provides a bash emulation, with a Unix-y suite of commands.
ssh firstname.lastname@example.org press Return
Smartty gives you command line access to OpenWrt and allows you to open/edit/download/upload files in OpenWrt, and is overall more modern and user-friendly than Putty (another tool detailed below):
opkg update && opkg install openssh-sftp-serverto install it. If the next step fails, it might be necessary to reboot the OpenWrt device for this new service to start up properly.
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 gives you command line access to OpenWrt:
putty.exedownload from the
Alternative binary filessection.
putty.exeon your Windows client → Putty's login window pops up.
Sessioncategory of Putty's login window, look for the field
Host Name (or IP address)and simply enter the IP-address (e.g. 192.168.1.1) of your OpenWrt device, keep the default provided port 22.
Openbutton at the Bottom to open a connection. This will pop up a shell windows, asking to
login as. Login as root with the OpenWrt password you have defined some time before. If you have not yet set a password yet on “root”, you will not be asked for the password.
WinSCP allows you to browse the OpenWrt file system in Windows Exlorer like GUI-style:
portable executablesand install or unzip them on your Windows client
WinSCP.exeon your Windows client, WinSCP's login window will pop up
New Siteon the left, then enter your OpenWrt device IP address (192.168.1.1) on the right side into
Host name, keep the default port
User nameenter root, in
Password, enter your root password (or leave blank, if you have not set a password yet)
Loginat the bottom of the Window.
Editing OpenWrt config files with WINSCP's integrated GUI editor:
To edit a OpenWrt config file with WinSCP's GUI-based editor, just right-click the file in WinSCP and select
Edit from the context menu.
All Linux distributions provide a command-line ssh client as part of the default installation.
ssh email@example.com(“ssh” is the command, “root” is the OpenWrt user you are connecting to, and “192.168.1.1” is OpenWrt default IP)
Linux also usually has SCP clients (to open/edit/download/upload files in OpenWrt), which may or may not be installed by default. You need to look up your distro's documentation or search with your package management interface for “SCP” to find where it is and its current installation status. 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.
On macOS (formerly Mac OSX) any terminal emulator will allow you to ssh. There several terminal emulators:
To ssh into your OpenWrt router at 192.168.1.1, type
ssh firstname.lastname@example.org, then press Return.