Skip to content

Commit b538377

Browse files
committed
Disable SSH by default, add config to enable when debugging
1 parent f708727 commit b538377

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The most common issue behind this is either bad USB cable or use of wrong USB po
6161
### Getting logs
6262
Once you've already tried multiple times and it still does not work, you can ssh into the device and try to get some logs.
6363

64-
- Set a static password by setting the `AAWG_WIFI_PASSWORD` config. See [the instructions to update the configurations](#Configurations).
64+
- Set a static password by setting the `AAWG_WIFI_PASSWORD` config, and enable SSH by setting the `AAWG_ENABLE_SSH` config. See [the instructions to update the configurations](#Configurations).
6565
- Connect the device to the headunit, let it boot and try to connect once. The logs are not persisted across reboots, so you need to get the logs in the same instance soon after you observe the issue.
6666
- Connect to the device using wifi (SSID: AAWirelessDongle, Password: \<as set in the first step>).
6767
- SSH into the device (username: root, password: password, see relevant defconfigs e.g. [raspberrypi0w_defconfig](aa_wireless_dongle/configs/raspberrypi0w_defconfig)).

aa_wireless_dongle/board/common/rootfs_overlay/etc/aawgd.conf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ AAWG_CONNECTION_STRATEGY=1
2323
######## Advanced Configuration ########
2424

2525
## Override Wifi Password
26-
## Set a custom password for the wifi network. This is usually only required when you're debugging the dongle.
27-
## Not recommended for normal use.
26+
## Set a custom password for the wifi network.
27+
## This is usually only required when you're debugging the dongle. Not recommended for normal use.
2828
#AAWG_WIFI_PASSWORD=ConnectAAWirelessDongle
29+
30+
31+
## Enable SSH
32+
## Enable SSH server to login and access the dongle's command prompt.
33+
## This is usually only required when you're debugging the dongle. Not recommended for normal use.
34+
#AAWG_ENABLE_SSH=1
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
if [ -z "$AAWG_CONF_SOURCED" ]; then
4+
echo "Source /etc/aawgd.conf"
5+
source /etc/aawgd.conf
6+
fi
7+
8+
if [ -z "$AAWG_ENABLE_SSH" ]; then
9+
echo "AAWG_ENABLE_SSH is not set. Skipping SSH setup."
10+
exit
11+
fi

0 commit comments

Comments
 (0)