diff options
| author | Craig Jennings <c@cjennings.net> | 2024-11-29 15:33:40 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-11-29 15:33:40 -0600 |
| commit | 8a57063b8c3e6a65858298a8eaa7970b324d9f3b (patch) | |
| tree | a2f2d9137e84e7c7620899e723d97d6a01ac83cb /init | |
| parent | 5daddeb0848a1e3f3dfc607b111fdc6cc52186fa (diff) | |
skipping the loopback interface
Diffstat (limited to 'init')
| -rwxr-xr-x | init | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -11,7 +11,7 @@ echo "root:welcome" | chpasswd hostname=$(</etc/hostname) # identify which interface is up, then find the ip address -interface_up=$(ip addr show | grep "state UP" -B2 | head -n1 | awk '{print $2}' | sed 's/://') +interface_up=$(ip addr show | grep -v "lo: " | grep "state UP" -B2 | head -n1 | awk '{print $2}' | sed 's/://') ipaddress=$(ip addr show $(interface_up) | grep 'inet ' | awk '{print $2}' | cut -d/ -f1) # start the ssh daemon |
