Create Limited ssh User

#!/bin/bash

echo -n "Enter username: "
read usernamee;

cd /tmp/
useradd $usernamee -m -d /home/$usernamee -s /bin/rbash
passwd $usernamee
cd /home/$usernamee/
echo 'PATH=""' >> /home/$usernamee/.profile
chmod 555 /home/$usernamee/
chmod 444 .bash_logout .bashrc .profile

Leave a Reply

Your email address will not be published. Required fields are marked *