Re: SSH Consent Banner

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Actually, this worked for me. I created a separate script that is called
within /etc/bashrc. This is what happens. It is probably considered crude,
but it works for me. Please let me know if there is a flaw in this approach.

Thanks.

Paul

HOSTNAME=`hostname`
   GREET=`cat /etc/issue`
   echo $GREET
   echo "Do you agree to this consent? [Y/N]"
   read answer

   case $answer in

   Y|y)
     echo "Welcome to $HOSTNAME."
     ;;

   N|n)
     echo "Goodbye."
     sleep 2
     PID=`ps -ef | grep ssh_test_1 | awk ' {print $3} '`
     kill -9 $PID
     ;;

   *)
     echo "Goodbye.  Try SSH again"
     echo "You Must enter a Y or a N "
     sleep 2
     PID=`ps -ef | grep ssh_test_1 | awk ' {print $3} '`
     kill -9 $PID
     ;;

   esac



On 2/1/08 7:21 PM, "Nikolas Lam" <nlam87346@xxxxxxxxxxxxxxxxxxx> wrote:

> 
> 
> On Fri, 2008-02-01 at 11:08 -0500, Paul Whitney wrote:
>> Can someone tell me how to configure SSHD to present a yes/no prompt? My
>> system currently is configured to present a consent banner, but it does not
>> require users to agree to the consent. Any help is appreciated.
>> 
>> Paul W.
>> 
>> 
> 
> Not sure how to do exactly that, but you could just present something
> using 
> 
>  Banner /etc/ssh_issue
> 
> in /etc/ssh/sshd_config. This will print the contents of /etc/ssh_issue
> just before putting in their passwords. In it you could say, entering
> your password is agreeing to your terms and conditions.
> 
> Once they log in, they'll also by default get the system's /etc/motd
> 
> 
> N.
> 
> 


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux