All posts tagged linux

Tương tự ssh-copy-id trên windows

ssh-keygen (nếu chưa gen key) type C:\Users\Home\.ssh\id_rsa.pub | ssh user@host “mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys” Thay C:\Users\Home\ bằng thư mục tương ứng trong máy và user@host bằng user và host tương ứng Nếu cần thì set permission trên remote server (nhưng thấy là không cần) chmod 700 ~/.ssh . . . Read more

Setup UFW on Centos (Uncomplicated FireWall)

How to setup UFW First, ensure you’ve enabled the EPEL repo. Install the UFW package using yum: [user@server] sudo yum -y install ufw Check it’s installed successfully: [user@server] sudo ufw status Which should show ‘Status: inactive’ In a basic firewall, denying all incoming traffic and allowing outgoing traffic is a good . . . Read more

IP Tables flush and some rules

51 Run the following. It’ll insert the rule at the top of your iptables and will allow all traffic unless subsequently handled by another rule. iptables -I INPUT -j ACCEPT You can also flush your entire iptables setup with the following: iptables -F iptables -X iptables -t nat -F iptables . . . Read more