Linux Iptables: Add / Delete An IP Address Remotely Using A Shell Script

Posted on in Categories , , , , , , , , last updated October 22, 2009

I’ve root ssh access and need to add / delete a few IP address on fly using the IPtables command via local shell script. How do I add or delete an IP address remotely over the SSH session under CentOS / Redhat / RHEL / Debian / Ubuntu Linux?

How to: Ubuntu / Debian Linux Regenerate OpenSSH Host Keys

Posted on in Categories , , , , , , last updated February 16, 2017

How do I regenerate OpenSSH sshd server host keys stored in /etc/ssh/ssh_host_* files? Can I safely regenerate ssh host keys using remote ssh session as my existing ssh connections shouldn’t be interrupted on Debian or Ubuntu Linux? How do I regenerate new ssh server keys?

Debian / Ubuntu Linux Install and Configure Remote Filesystem Snapshot with rsnapshot Incremental Backup Utility

Posted on in Categories , , , , , , last updated December 18, 2016

I would like to configure my Debian box to backup two remote servers using rsnapshot software. It should make incremental snapshots of local and remote filesystems for any number of machines on 2nd hard disk located at /disk1 ( /dev/sdb2). How do I install and use rsnapshot on a Ubuntu or Debian Linux server?

How to: Transfer MySQL database from one server to another UNIX / Linux server

Posted on in Categories , , , , , , last updated October 8, 2007

Q. I’m moving my server from local data center to another data center. I’ve new server up and running. My site is dynmic and I’d like to transfer MySQL database from old server to new server. How do I make transfer smooth and successful?

. The best and secure way is to use ssh to transfer database to another server. You need to use following tools:

=> SSH client
=> SSH Server on remote box
=> mysqldump command
=> UNIX pipes

Let us say you would like to Transfer MySQL database called foo to remote box called bar, enter the following command at shell prompt:
$ mysqldump foo | ssh [email protected] mysql foo

You can just copy table called chocolate (from recipe database) to remote database called icecream using same syntax:
$ mysqldump recipe chocolate | ssh [email protected] mysql icecream