I just found that to remain logged in at all times you just need to keep hitting the keepalive window. It resets the time you have remaining.
Login/setup once, then keep this script running. It will keep your session alive continuously (effectively "logged in forever") unless your Wi-Fi/network settings change or you switch to a different portal context.
Special credits to chrome developer tools and eyesight lol.
Use only with your own authorized institute account/network access.
- The script asks for your BITS username and password only once on first run.
- Credentials are saved locally at
~/.config/bits-keepalive/credentials.envwith restricted permissions. - Next runs do not ask again unless you run reset mode.
- After setup, running the script keeps refreshing the session timer automatically.
No fork required if you just want to use it.
git clone https://github.com/aksh08022006/BitsPilaniAuthScript.git
cd BitsPilaniAuthScript
chmod +x bits_keepalive.shClick Fork on GitHub
Clone your fork:
git clone https://github.com/<your-username>/BitsPilaniAuthScript.git
cd BitsPilaniAuthScript
chmod +x bits_keepalive.shDo one-time setup (login details), then run in background and forget it.
One-time setup only (save credentials and exit):
./bits_keepalive.sh --setupThen start keepalive in background:
chmod +x bits_keepalive.sh
nohup ./bits_keepalive.sh > bits_keepalive.log 2>&1 &Sorry u guys don't have bash by default.
Run the script inside Git Bash or WSL and use the shell background operator so it keeps running even after you close the terminal:
chmod +x bits_keepalive.sh
./bits_keepalive.sh > bits_keepalive.log 2>&1 &Reset saved credentials (if network settings change):
./bits_keepalive.sh --resetRun one cycle and exit (quick test):
./bits_keepalive.sh --onceStop background job later:
pkill -f bits_keepalive.sh