Sunday, 2 September 2018

Tinkering OpenWRT (11) : SSH Configuration and Upload Files

Coding is done with cross-compiling. After we pack the compiled package, .pkg file, we need to upload the file to the board and install.

Step 1:
Edit /etc/config/dropbear:
The first option is used if the client is connect to the openwrt AP. The second option is used if both the client and the openwrt board are connected to the router.

config dropbear
        option PasswordAuth 'on'
        option Port '22'
        option Interface 'lan'

config dropbear
        option PasswordAuth 'off'
        option Interface 'wan'
        option Port '2022'
Step 2:
ifconfig  to get the openwrt IP address.
ssh root@192.168.0.24 -p 2022

Enter the password to test the ssh connection.

Step 3:
scp -P 2022 helloworld_1_ar71xx.ipk root@192.168.0.24:/root/

ref:
https://wiki.openwrt.org/doc/uci/dropbear
https://blog.csdn.net/qq_29663071/article/details/79081103
http://blog.51cto.com/lynnteng0/1066795



No comments:

Post a Comment