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 with connection methods, so if you're interested, stay tuned until the end.
::: info
This blog uses 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, which is default: password
.
:::
Termius#
Termius is an all-English SSH/Telnet tool. The upcoming video blog content will revolve around this software. It was chosen mainly because it offers cross-platform support, allowing synchronization between computer and mobile, and it also has comprehensive sftp file management.
The downside is that it may frequently remind you to switch to the free plan.
In the software, 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 under the account + Password,Key,Certificate,FIDO2
, select Password
, and enter the password for our router's backend, which is default password
. If you have changed the password, enter your modified password.
Click Connect to successfully connect. On the first login, you need to enter and press to save the key, and here is the terminal interface of OpenWrt.
TTYD#
We generally run TTYD on CatWrt without wireless devices. If you are using the default IP address (192.168.1.4) Click me to access CatWrt - System - TTYD Terminal.
If you don't have it, you can choose to install one, but for wireless routers with limited space, there's actually no need 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 when you see Password: enter the password for our router ( Password is not visible when entered).
Press again to successfully connect, and here is the terminal interface of OpenWrt.
TTYD may not start automatically, and you need to restart the TTYD service in System - Startup Items!
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 Windows 7 users can also use CMD.
You need to check if your 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.
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.
On the first login, you need to enter yes
and press to save the key, so 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 ( Password is not visible when entered).
Key Error#
This error occurs because you 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.
Use this command to clear the key, 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, and you can compare the ease of use. The operations are generally similar, just different names.
- Termius (feature-rich, English, easier to use)
- TTYD (simple, some machines may require additional installation)
- Terminal (simple, built into Win11)
- Putty (basic, English, easy to understand)
- Finalshell (Chinese, easy to use, not recommended)
In conclusion, if you also want better clipboard synchronization, you can use WeChat Input Method to achieve multi-end clipboard synchronization. In the future, Miao Er's videos will be featured alongside Termius.
Help#
Firmware support is not perfect, and bugs are inevitable. If you encounter problems, please leave a comment below or join the group to ask. If you are using my firmware, you can consult me briefly. If it's a paid service, that's even better. I won't respond to issues with others' firmware!
- Buy the author a milk tea: Sponsor
- CatWrt QQ Group (problem handling): 669190476
- QQ Channel: Miao Er's Communication
- Telegram Group: Miao Er's Communication
Feel free to leave comments to encourage ( ´・・) ノ (._.`)
This article is synchronized and updated to xLog by Mix Space. The original link is https://www.miaoer.net/posts/blog/ssh-connection-to-openwrt