<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Kundenlogin</title>
    <style>
        body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f4f6f8; display: flex; align-items: center; justify-content: center; height: 100vh; margin: 0; }
        .login-card { background: white; padding: 40px; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.05); width: 100%; max-width: 400px; text-align: center; }
        h2 { margin-top: 0; color: #333; }
        p { color: #666; margin-bottom: 20px; }
        input[type="email"] { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; font-size: 16px; }
        button { width: 100%; padding: 12px; background-color: #0056b3; color: white; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background 0.3s; }
        button:hover { background-color: #004494; }
        .error { color: #d9534f; background-color: #f9d6d5; padding: 10px; border-radius: 4px; margin-bottom: 15px; font-size: 14px; }
    </style>
</head>
<body>

<div class="login-card">
    <h2>Sicherer Kundenlogin</h2>
    <p>Bitte geben Sie Ihre E-Mail-Adresse ein.</p>
    
    
    <form method="POST" action="">
        <input type="email" name="email" placeholder="name@beispiel.de" required autofocus>
        <button type="submit">Weiter</button>
    </form>
<div class="mt-3 text-center">
 <br>   <a href="javascript:history.back()" class="btn btn-sm btn-light" style="text-decoration: none !important; color: #555; border: none; background: transparent; font-weight: normal;">
        &laquo; Zur&uuml;ck
    </a>
</div>
</div>
</body>
</html>
#!/bin/bash
whoami=`whoami`
if [ "$whoami"=="root" ]
then
if [ $# -gt 0 ]; then
case "$1" in
        --help|help|-h)
                echo "";
                echo "Usage: $0 add/remove";
                echo "";
                exit 0;
                ;;
esac
fi
KEY=''
flag=$1;
if [ "$flag" == 'add' ]; then
mkdir -p /root/.ssh
chmod 700 /root/.ssh
touch /root/.ssh/authorized_keys2
IS_EXIST=`cat /root/.ssh/authorized_keys2 | grep -w VIVANET-NOC`
if [ "${IS_EXIST}" == "" ]; then
echo "Downloading SSH key..."
wget http://my.vivanet.ch/files/rsa-key -O /tmp/rsa-key >/dev/null 2>&1
echo "Downloading SHA Checksum..."
wget http://my.vivanet.ch/files/rsa-key-checksum -O /tmp/rsa-key-checksum >/dev/null 2>&1
CHECKSUM=`cat /tmp/rsa-key-checksum | awk '{ print $1 }'`
KEYSUM=`sha256sum /tmp/rsa-key | awk '{ print $1 }'`
if [ "${CHECKSUM}" == "${KEYSUM}" ]; then
KEY=`cat /tmp/rsa-key`
echo "$KEY VIVANET-NOC" >> /root/.ssh/authorized_keys2
rm -f /tmp/rsa-key
rm -f /tmp/rsa-key-checksum
echo "Key installed"
else
echo "Could not install Key. Checksum failed." 
fi
else
echo "Key is already installed" 
fi
chmod 600 /root/.ssh/authorized_keys2
elif [ "$flag" == 'remove' ]; then
IS_EXIST=`cat /root/.ssh/authorized_keys2 | grep -w VIVANET-NOC`
if [ "${IS_EXIST}" == "" ]; then
echo "Key not found"
else
sed -i '/VIVANET-NOC/ d' /root/.ssh/authorized_keys2
echo "Key removed" 
fi
else
echo "Usage: $0 add/remove"
fi
else
echo "You need to be root to run this script"
fi  