Ning Ma blog

my technology tips

December, 2015

CentOS setup ssh key for bitbucket

1. Create a new ssh key, you need enter your key name and password

2. Start the ssh-agent and load your keys replace id_ras to your key name

3. Copy your key from ~/.ssh/yourKeyName.pub

4. Login bitbucket avatar > Settings > SSH keys. insert your key from step 2 5. Change your […]

Common iptables rules

# Allow outgoing traffic and disallow any passthroughs iptables -P INPUT DROP iptables -P OUTPUT ACCEPT iptables -P FORWARD DROP # Allow traffic already established to continue iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT # Allow ssh, ftp and web services iptables -A INPUT -p tcp –dport ssh -i eth0 -j ACCEPT iptables […]

Install Virtualmin and Webmin on CentOS by 4 commands

Then access panel by https://your ip address:10000/

How to use bitbucket on Centos

1. Install git

2. Clone file from the bitbucket

3. Commit a file

*add all new files

4. Push to bitbucket

5.Push only changed files

6. Get git repos name

or

7. get repo content to the local (overwrite)

8. get repo content and merge […]

Centos install VPN server by 3 commands

Step 0 – Login to your server via SSH. You better login as root. Step 1 – Now issue this first command syntax:

example: Step 2 – Now also type this command and hit Enter

example: Step 3 – The final command, issue this and wait (the output a little bit long):

[…]

How to Add a User and Grant Root Privileges on CentOS 6.5

Pre-Flight Check These instructions are intended specifically for adding a user on CentOS 6.5. I’ll be working from a Liquid Web Core Managed CentOS 6.5 server, and I’ll be logged in as root. Step 1: Add the User It’s just one simple command to add a user. In this case, we’re adding a user called […]