SSH ForceCommand example - require a user to enter a token before getting shell access?
        Posted  
        
            by 
                consolibyte
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by consolibyte
        
        
        
        Published on 2011-02-24T17:32:47Z
        Indexed on 
            2012/09/07
            3:39 UTC
        
        
        Read the original article
        Hit count: 493
        
ssh
I'd like to prompt a user for some piece of information before they get to their BASH shell when they're logging in via SSH. Ideally, I'd like to execute a script which prompts them for information, check that the information is correct, and then if it is drop them to a shell. So, think:
ssh [email protected]
password: xxxx
do you agree to the terms and conditions of use? enter yes or no:
yes 
OK, here's your shell:
# 
Can anyone provide an example of how to do something like this?
© Server Fault or respective owner