Creating a strong SSH key pair for file transfer without a password

Creating a strong SSH key pair for file transfer without a password

Passwords really get in the way of scripts that have to automatically transfer files. They can also be annoying if you’re logging into the same machine all the time. If you create a key pair between two machines however, the account you created it for won’t have to provide a password when accessing the other machine. Note these are 1 way, meaning if you put computer A’s ssh key on computer B, A can log into B without a...

Read More

Binding NIC cards in Ubuntu to create redundancy

If you have 2 network interfaces in Ubuntu, you may want to bind them together to create redundancy. If you bind two NICs together, 1 can be unplugged, or unavailable to the network and the IP address will still broadcast through the other NIC. So here’s how to do it in Ubuntu. Install ifenslave: sudo apt-get install ifenslave Add some settings into the /etc/modules file: echo “bonding mode=active-backup miimon=100...

Read More

Ubuntu disk space issues with virtual files

I recently had an issue over Thanksgiving with a server running out of disk space. I was fairly perplexed because it had 30 gigs free on the primary drive. All of the data was stored on a separate disk, so the only thing that should have been creating files was the operating system. It turns out the issue was with a php script that wasn’t finishing. It was just sitting there looping. Now on paper, the machine should have run out memory and...

Read More

Swap monitoring and auto fix script

So a little while ago I mentioned that you could combine the swap monitoring script and the script that trys to put the swap back into working memory into a script that would just take care of it. I found that my machines were going into swap for trivial reasons, so I just set up a cron to run every 15 minutes that checks for swap, and if it finds any it just throws it back into working memory. Script below: #!/bin/bash swap=$(top -bi -n 1 |...

Read More

Running scripts at startup

If you want to run a command or a script you wrote and have it run in the background every time Ubuntu starts, then simply add the script to the rc.local file. Make sure your script is executable, and then simply insert the full path of the script into the rc.local file. The rc.local file is in the /etc/ directory for Centos and in /etc/init.d/ for Ubuntu. If you want to reload the rc.local startup file, without restarting your computer,...

Read More

A little about SWAP

A little about SWAP

Swap has been a major pain in my tush while managing Ubuntu Systems. Even my one machine with 16 gigs of RAM still finds itself in swap after a while. So I’ve been hunting around trying to come up with solutions to swapping machines, and how to keep machines out of swap. What is Swap From my experience, swap is NEVER a good thing, and your machine will never leave swap once its in that state, even if the memory demand decreases to the...

Read More