Skip to main content

Commands Cheatsheet

Start VNC (as root)

x11vnc -shared -forever -noxdamage -localhost -noxrecord -nopw -many -loop -display :0

Start noVNC (with ssl)

 novnc --listen 443 --cert /etc/letsencrypt/live/suda.formatc.hr/fullchain.pem --key /etc/letsencrypt/live/suda.formatc.hr/privkey.pem

renew Let's encrypt certificate

certbot certonly --standalone -d suda.formatc.hr

Adding a restricted user

#add usrer
useradd -m $USERNAME

#Create /usr/local/bin/rbash with contents
#!/bin/bash
/bin/bash --restricted

#Make it executable 
chmod +r /usr/local/bin/rbash

#add /usr/local/bin/rbash to /etch/shells

#Change shell to the restricted shell 
chsh -s "/usr/local/bin/rbash" suda