login website quicker using linux command line
As a Linux sys-admin we will face many logins and has to remember username passwords. I want to share how to akses quicker without remembering username or password
#make a script below
echo "username" |xclip -sel clip |chromium-browser (input url address for login)
sleep 5
echo "password" |xclip -sel clip
--------
Explanation of the script above
1. echo "username" |xclip -sel clip <-- will copy to clipboard your username
2. echo "username" |xclip -sel clip |chromium-browser (input url address for login https://...) <-- the second part of the first line will open the login url https://.... in the chromium browser.
or open with another version of google chrome browser use below command:
google-chrome (input url address for login)
to open in firefox
firefox (input url address for login)
3. sleep 5 <------ will wait for 5 seconds until execute the next command
In sleep 5 seconds can be arrange longer if the usual login loading in browser will take more than 5 seconds
4. echo "password" |xclip -sel clip <---- will copy the password in clipboard
------------
So When the command is executed:
1. it will copy username in the clipboard
2. will open the url login to the browser
3. if cursor already in the login box, press in keyboard Ctrl-v to paste the username
4. wait for 5 seconds (usually i count 1, 2, 3 .. to 10)
5. tab to the password box and Ctrl-V will input the password
6. press enter to login.
---
To make it simple you can separately make a script for the copy to clipboard command as explain on my other tutorial below. Thanks
https://hopelinux.blogspot.com/2022/05/copy-to-clipboard-from-command-line.html
Comments
Post a Comment