Setting a remote key through ssh

One of the steps I find myself doing a lot is distributing round an ssh key so that I can login and use different machines automatically. To help in that process I created a small function in my bash profile script (acutally for me it’s in .bash_aliases):

function setremotekey
{
OLDDIR=`pwd`
if [ -z "$1" ]
then
echo Need user@host info
fi
cd $HOME
if [ -e "./.ssh/id_rsa.pub" ]
then
cat ./.ssh/id_rsa.pub |ssh $1 'mkdir -p -m 0700 .ssh && cat >> .ssh/authorized_keys'
else
ssh-keygen -t rsa
cat ./.ssh/id_rsa.pub |ssh $1 'mkdir -p -m 0700 .ssh && cat >> .ssh/authorized_keys'
fi
cd $OLDDIR
}

To use, whenever I want to copy my public key to a remote machine I just have to specify the login and machine:

$ setremotekey mc@narcissus

Then type in my password once, and the the function does the rest.

How? Well it checks to make sure I’ve entered a user/host (or actually just a string of some kind). Then, if I haven’t created a public key before (which I might not have on a new machine), I run the ssh-keygen to create it. Once the key is in place, I output the key text and then use ssh to pipe append that to the remote authorized_keys file, creating the directory along the way if it doesn’t exist.

Short and sweet, but saves me a lot of time.

Wi-fi piggybacking is all too easy

The story about a wireless hijacking, and this related piece about Two cautioned over wi-fi 'theft' is interesting, but sadly all too easy.

My wi-fi is protected, not only with encryption, but also by restricting by MAC address and deliberately hiding the wi-fi service. However, there are no less than five wifi services from other houses which are neither hidden, nor restrictive, and not one of them requires a password to connect or any type of encryption.

Wi-fi piggybacking is all too easy

The story about a wireless hijacking, and this related piece about Two cautioned over wi-fi 'theft' is interesting, but sadly all too easy.

My wi-fi is protected, not only with encryption, but also by restricting by MAC address and deliberately hiding the wi-fi service. However, there are no less than five wifi services from other houses which are neither hidden, nor restrictive, and not one of them requires a password to connect or any type of encryption.

Wi-fi piggybacking is all too easy

The story about a wireless hijacking, and this related piece about Two cautioned over wi-fi 'theft' is interesting, but sadly all too easy.

My wi-fi is protected, not only with encryption, but also by restricting by MAC address and deliberately hiding the wi-fi service. However, there are no less than five wifi services from other houses which are neither hidden, nor restrictive, and not one of them requires a password to connect or any type of encryption.

Wi-fi piggybacking is all too easy

The story about a wireless hijacking, and this related piece about Two cautioned over wi-fi 'theft' is interesting, but sadly all too easy.

My wi-fi is protected, not only with encryption, but also by restricting by MAC address and deliberately hiding the wi-fi service. However, there are no less than five wifi services from other houses which are neither hidden, nor restrictive, and not one of them requires a password to connect or any type of encryption.

Wifi piggybacking is all too easy

The story about a wireless hijacking, and this related piece about Two cautioned over wi-fi 'theft' is interesting, but sadly all too easy.

My wi-fi is protected, not only with encryption, but also by restricting by MAC address and deliberately hiding the wi-fi service. However, there are no less than five wifi services from other houses which are neither hidden, nor restrictive, and not one of them requires a password to connect or any type of encryption.

Designing a Scalable Grid, part 2

The second part of the two part series on designing a scalable grid system is now available at developerWorks. This tutorial looks at the hardware of the individual nodes and then at operating system and application considerations.

For example, I take a close look at the optimization of CPU and RAM in your grid node selections, and how to identify and resolve issues with RAM limitations. You can also use CPU selections to help drive and optimize your grid.

For the operating system, I look at the different benefits and advantages of operating system choice, including how some operating systems provide a richer security solution out of the box, while others may be better suited for the large memory or storage requirements associated with a grid manage or distribution node.

In terms of the application, I cover the use of a component, rather than a single application model, and how the methods of distribution of information can change the way you design and expand your grid and may ultimately affect the scalability.

Read: Design a scalable grid, Part 2: Operating system and application

UK to get free energy meters

According this this story, and the the original BBC story, the UK population is going to be able to request a home energy meter that will tell us how much energy is being used and how much it is costing.

The meters themselves are a stop gap until we get proper smart meters, but they should help us monitor what is going on. Unfortunately these units wont be good enough that we'll be able to get and long term (or even short term) information without manually recording the details, but it's a good start.

UK to get free energy meters

According this this story, and the the original BBC story, the UK population is going to be able to request a home energy meter that will tell us how much energy is being used and how much it is costing.

The meters themselves are a stop gap until we get proper smart meters, but they should help us monitor what is going on. Unfortunately these units wont be good enough that we'll be able to get and long term (or even short term) information without manually recording the details, but it's a good start.

All the MCB Guru blogs that are fit to print