I currently have a script that runs upon a user logging into a Linux server and at the end it prints
However, most users I find are just "entering" through the prompt (spacebar, enter, random keys, etc) since the script isn't looking for specific entry, and now users have written their own scripts or macros to enter past this.
As a solution, I would like the script to print a string of random numbers, and then require the user to enter those numbers back into the prompt before allowing access.
"Welcome to Server! Please enter the following one-time passphrase to continue: 1234.
How can I accomplish this?