Because the recent Cattools and Thunder Manager require SSH for configuration, to help newcomers avoid reinventing the wheel in the blog, I will create an SSH tutorial. Once it's done, you can continue with the original blog!
Through this podcast, you can try three different SSH connection methods:
- Termius
- TTYD
- Windows Terminal or CMD (OpenSSH)
Other tools are also provided here for connection methods, so if you're interested, stay tuned until the end.
::: info
This blog will use CatWrt for demonstration throughout, and the IP in the demonstration images may not match the default.
However, all links in the text are set to default, assuming your IP hasn't changed, you can directly access the links for quick configuration.
Default IP: 192.168.1.4
, and the password is the same as your login password for the OpenWrt backend, default: password
:::
Termius#
Termius is an all-English SSH/Telnet tool. The content of our future video blogs will revolve around this software. The main reason for choosing it is that it provides cross-platform support, allowing synchronization between computer and mobile devices, and it also has comprehensive sftp file management.
The downside is that it may frequently remind you to switch to a free plan.
In the software, we click NEW HOST
to create a new host. In the Address field, fill in our IP address or hostname, for example, our OpenWrt is 192.168.1.4
, so we fill it in here.
In the General section under Label, add a name you like, naming it CatWrt here.
In the Credentials from Personal vault section, the Username is our account root
. Click the plus sign below the account + Password,Key,Certificate,FlDO2
, select Password
, and enter the password for our router's backend, which is password
by default. If you have changed the password, enter the modified password.
Click Connect, and the connection will be successful. The first time you log in, you need to enter and press enter to save the key, and here is the terminal interface of OpenWrt.
TTYD#
Here, TTYD is generally deployed on CatWrt soft routers without wireless devices. If you are using the default IP address (192.168.1.4) Click here to access CatWrt - System - TTYD Terminal
If you don't have it, you can choose to install one, but wireless routers often have limited space, so it's actually unnecessary to use TTYD's Webshell feature to avoid wasting precious storage space.
CatWrt login: root
Password:
When you see CatWrt login: first enter our account root
and then press enter when you see Password: enter the password for our router ( the password is not visible when entered).
Press enter again to successfully connect, and here is the terminal interface of OpenWrt.
TTYD may not start automatically; you need to restart the TTYD service in System - Startup!
Terminal#
The Terminal here is built into Windows 11. If you are using Windows 10 and don't have it, you need to download one from Microsoft Store, or you can also use CMD with Windows 7 users.
You need to check if OpenSSH is installed by going to Settings - System - Optional Features to see if the OpenSSH client is available. If it is, you can skip the installation steps.
To install, click on View features
at the top, find OpenSSH, check it , and proceed to add it.
On the desktop, right-click and select Open in Terminal
, or press the Windows key to open the start menu and search for Terminal to open it.
Once opened, enter ssh [email protected]
, ensuring there is a space after ssh before entering root@, which indicates logging in with the root account, followed by the IP address of the OpenWrt router.
The first time you log in, you need to enter yes
and press enter to save the key so that you won't need to confirm the key next time. The following image demonstrates the situation where you don't need to confirm the key for subsequent logins.
PS C:\Users\Cat> ssh root@10.0.0.4
The authenticity of host '10.0.0.4 (10.0.0.4)' can't be established.
ED25519 key fingerprint is SHA256:djoJMQvgOoMgk6DCPxlyfs1VvHluM2GjGw143IDbx3s.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.0.0.4' (ED25519) to the list of known hosts.
root@10.0.0.4's password:
This demonstrates IP: 10.0.0.4
, please modify it according to your router's actual address ( the password is not visible when entered).
Key Error#
This error occurs because you have previously connected to the same IP, but the key corresponding to the IP has changed. This demonstrates IP: 192.168.31.1
, please modify it according to your router's actual address.
PS C:\Users\Cat> ssh root@192.168.31.1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
85:82:b1:58:20:21:a5:da:be:24:e8:14:9a:12:b2:d2.
Please contact your system administrator.
Add correct host key in C:\Users\Cat\.ssh/known_hosts to get rid of this message.
Offending ECDSA key in C:\Users\Cat\.ssh/known_hosts:5
ECDSA host key for 192.168.31.1 has changed and you have requested strict checking.
Host key verification failed.
You can clear this key using the command, or delete this file at this path C:\Users<username>.ssh/known_hosts
.
ssh-keygen -R 192.168.31.1
Third-party Software#
You can use other software to replace some of the operations here, and you can compare the ease of use; the operations are mostly similar, just different names.
- Termius (feature-rich, English, more user-friendly)
- TTYD (simple, some machines may require additional installation)
- Terminal (simple, built into Win11)
- Putty (basic, English, easy to understand)
- Finalshell (Chinese, user-friendly, not recommended for use)
Finally, if you want better clipboard synchronization, you can use WeChat Input Method to achieve multi-end clipboard synchronization. In the future, Miaoer’s videos will be featured alongside Termius.
Help#
Firmware support is not perfect, and there may be bugs. If you encounter problems, please leave a comment below or join the group to inquire. If you are using my firmware, you can ask for simple advice; if it's paid, that's even better. If you're using someone else's firmware, I won't respond!
- Treat the author to milk tea: Sponsor
- CatWrt QQ Group (problem handling): 669190476
- QQ Channel: Miaoer’s Communication
- Telegram Group: Miaoer’s Communication
Feel free to leave comments to encourage ( ´・・) ノ (._.`)
This article was synchronized and updated to xLog by Mix Space. The original link is https://www.miaoer.net/posts/blog/ssh-connection-to-openwrt