| 1234567891011121314151617181920 |
- #!/bin/bash
- # Licence : GPL v3
- # Author: Laurent HUBERT
- #
- # Display connection information
- #
- IP_V4_VALUE=$(ip a | grep -v host | grep inet | grep -v inet6 | awk '{print substr($2, 1, index($2, "/")-1)}')
- IP_V6_VALUE=$(ip a | grep -v host | grep inet6 | awk '{print substr($2, 1, index($2, "/")-1)}')
- MAIN_USER_VALUE=$(id -u 1000 -n)
- cat <<EOF
- °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
- You can connect to this system using the
- following information:
- IPv4: $IP_V4_VALUE
- IPv6: $IP_V6_VALUE
- sudoer user: $MAIN_USER_VALUE
- °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
- EOF
|