Home Networking with Linux

Posted on November 23, 2007 by nseidm1.
Categories: ftp, home, linux, networking, scp, ssh.

Gnome offers in its top panel an applet to configure graphical, folder view FTP and SSH connections. This easily implements a type of home network that is capable of transferring files back and forth between multiples computers. While FTP is substantially faster, SSH is increasingly secure; its a trade off. Overall the graphical aspect is uncomparable, and simply superior to the traditional FTP client, or terminal based SSH connection or SCP transfer. The following is a screen shot of the Gnome Panel graphical networking configuration menu.

Gnome Panel SSH and FTP Graphical Connections

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati

Gnome Panel SSH More Stable Than SCP

Posted on November 12, 2007 by nseidm1.
Categories: gnome, scp, ssh.

My experiences will the bash scp command have been less reliable than the graphical ssh service offered by the gnome panel. While both services will indeed function for small batches of files, but with large batches, such as a complete server transfer, stalls and kernel errors occur in my Debian VirtualBoxs. Either way the graphical ssh connection is more appealing as a result of mouse controlled and an on-screen displayed file transfer progress window.

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati

At Least 2 Backups

Posted on October 28, 2007 by nseidm1.
Categories: backup, scp, ssh.

I recommend at least 2 backups of your server files. Blogs that utilize mysql database backends are extremely simple to backup. Your entire database can be saved as an sql file, therefore for a complete system backup you just need to scp your server files to another machine. For instance my setup involves two machines, a web server, a mail server, and my laptop. With the scp command I backup my files from my web server to my mail server, and then from my mail server to my laptop.

There is one interesting thing I have observed about scp: it utilizes the -P option; a capital. Whereas ssh utilized -p; in lowercase.

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati

SCP Via Wireless or Ethernet

Posted on October 24, 2007 by nseidm1.
Categories: ethernet, scp, wireless.

I’ve experience problems backing up my web server, via scp, over my wireless connection. To resolve this I simply connected my computer via ethernet, rather than wireless. It seems that the wireless was causing the scp to stall whereas via a direct ethernet connection everything goes smoothly.

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati

Complete Web Server Backup with One Command

Posted on August 12, 2007 by nseidm1.
Categories: Mysql, scp, ssh.

SSH protocol and the scp command are rather powerful and secure. With one swift scp command the entire web server directory, or directories, can be backed up. I have in the past copied my raw mysql database files for purposes of backup, then to restore them later just by copying them to the proper location. Fedora Core 7, and Fedora 7 stores its mysql database files in:

/var/lib/mysql

Therefore to backup the entire /var/lib/mysql directory use:

scp-r /var/lib/mysql/* user@othercomputerip:webserverbackupfolder/

The same command can be used for your root website folders.

This simply command is great for webmasters that update their websites often. It allows for cron (automated) jobs to be run taking care of critical backup procedures.

Since SSH and scp rely on rsa encryption protocols, you must use the ssh-keygen command to generate your keys. If you plan to use to above scp command to automatically backup your files, your rsa key will have to use no password. The ssh-keygen command prompts you for a password or none.

Once you generate your scp scripts you can pop them in your /etc/cron.hourly or /etc/cron.daily folders to achieve automation.

All the scp script will contain is two scp command with appropriate options. An example:

scp -r /var/lib/mysql/* user@othercomputerip:mysqlbackup/

scp -r /home/user/websites/* user@othercomputerip:mysqlbackup/

You can plate the above two line, after customization, in a file called autossh.sh

Then make the file executable, and you can run it by:

./autossh.sh

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati

SCP -r Option

Posted on August 9, 2007 by nseidm1.
Categories: scp.

SCP is like ftp but utilizing SSH encryption protocols. It can be used to transfer single files, and this is the default option for a straight scp command. To copy entire folders, and directories, while maintaining existing hierarchy, simply utilize the -r option. An example:

scp -r user@192.168.0.2/internet/websites/* /internet/websites/

This will copy all of the files and folders within the website directory, at 192.168.0.2, to the websites directory on the local machine. This can be used to backup, or restore, all of your websites with one command. :)

Share, Enjoy, and Support:
  • Digg
  • del.icio.us
  • NewsVine
  • StumbleUpon
  • Technorati