Apr
30
2012

Using sudo, ssh, rsync on the Official Ubuntu Images for EC2

The official Ubuntu images for EC2 do not allow ssh directly to the root account, but instead provide access through a normal “ubuntu” user account. This practice fits the standard Ubuntu security model available in other environments and, admittedly, can take a bit of getting used to if you are not familiar with it. This document describes how to work inside this environment using the “ubuntu” user and the sudo utility to execute commands as […]

Apr
30
2012

Configuring a client-to-site VPN through PPTP on a Cisco router

When configuring up a new Cisco router, turning on the VPN server functionality is a really handy feature to have – but again it’s one of them that you only need once-in-a-while. There are millions of different things that you can tweak – authentication, IP allocation, etc – but I’ll run through how to configure it up for use in a small office environment. First off, you’ll want to make sure that you have VPN server functionality. […]

Apr
30
2012

Automating backups using rsync, bash and cron

Rsync it  is a command line program for Linux that performs a backups. Bash is a scripting language for Linux that allows you to automate the commands you run in the command line. And Cron is a Linux program that schedules programs to run, based on time. You can see the potential for these three programs to work together to provide automated backups!I wanted to backup my home directory using rsync to a separate drive, […]

Apr
30
2012

Linux’s bash shell script – Check running program

Since I have develop a script code to do automatic synchronize files between server and clients. The code is designed to run in background. To make sure that the program is still running the following code is used to recognize the running process. #!/bin/sh SERVICE=’httpd’ if ps ax | grep -v grep | grep $SERVICE > /dev/null then echo “$SERVICE service running, everything is fine” else echo “$SERVICE is not running” echo “$SERVICE is not […]

Apr
30
2012

SSH Automatic Login

Of course this is not the right phrase for it. It should be something like “key-based authorization with SSH”. Or simply “publickey authorization”. Or “unattended ssh login”. But I guess you know what I mean. Here are the steps: Create a public ssh key, if you haven’t one already. Look at ~/.ssh. If you see a file named id_dsa.pub then you obviously already have a public key. If not, simply create one. ssh-keygen -t dsa […]

Pages:«12345678



Member Area