Cover Image

Create Limited ssh User

August 1, 2021 Reading time: ~1 minute
#!/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

Cover Image

Show Active ssh Users

August 1, 2021 Reading time: ~1 minute

Show Active ssh Users

#!/bin/bash
lsof -i tcp -n | grep '\<ssh\>' | awk '{print $3}' | sort | uniq

Hit Counter

25