Learn about Centmin Mod LEMP Stack today
Become a Member

Sysadmin Role of QR Codes In Centmin Mod ?

Discussion in 'System Administration' started by eva2000, Aug 4, 2019.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    55,396
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    7:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Curious how many folks here use QR Codes in some form or another ? Recently I have been playing with Wireguard VPN and it supports creating client VPN configuration profiles generated as QR Codes and you can then use Wireguard Android app to scan the QR Code and import the client VPN configuration profile into Wireguard Android app ! I love this feature !

    So was thinking how I can utilise QR Codes in Centmin Mod to quickly transfer Centmin Mod info from SSH session output to QR Codes which your mobile or desktop computers can scan the QR Codes to transfer the info easily. Would be fairly noob proof to get folks to scan a QR Code versus running SSH commands to inspect log files for Centmin Mod information/login details and/or download via SFTP/FTP logs and then inspect those logs etc.

    Though thee's a 3KB size limit for data converted.

    Example on CentOS install qrencode YUM package and then pipe in text to qrencode to generate the QR Code
    Code (Text):
    yum -y install qrencode
    echo https://centminmod.com | \qrencode -t ansiutf8
    

    another example login.txt text file containing
    Code (Text):
    Username: user
    Password: pass
    Email: email@domain.com
    

    Code (Text):
    cat login.txt | \qrencode -t ansiutf8


    scanning the resulting QR Code in QRDroid
    Screenshot_2019-08-04-14-12-28-951_la.droid.qr~01.png


    or piping nginx -V config output to a png file
    has 2035 characters in output
    Code (Text):
    nginx -V 2>&1 | wc -c
    2035
    

    Code (Text):
    nginx -V 2>&1 | \qrencode -o nginx-ver-01.png -t png -v13 -s2 -m3
     

    Attached Files:

    Last edited: Aug 5, 2019
  2. eva2000

    eva2000 Administrator Staff Member

    55,396
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    7:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Updated centmin.sh menu option 22 in 123.09beta01 so that wordpress installer can optionally generate QR Codes for wordpress login details, nginx pure-ftpd ftp login details and optionally for wp-login.php HTTP password protection login details so you can scan the QR Codes to get the info onto your mobile, laptop/desktop easily. QR Code generation is disabled by default unless you set QRCODE='y' in your persistent config file /etc/centminmod/custom_config.inc prior to running centmin.sh menu option 22.

    Examples below

    [​IMG]
    [​IMG]
    [​IMG]
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,396
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    7:42 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Just a reminder that Centmin Mod supports qrencode command which allows you to pass text to be QRCode converted. Allowing you to pass text, info quickly from server SSH command output to your mobile device when you scan the QRCode :)

    i.e.
    Code (Text):
    qrencode centminmod.com
    

    IMG_20220930_230535~01.jpg