‘ How-To’s ’ category archive

Creating SSH Keys

May 16, 08 by cjgibbs

My purpose for doing this was to automate file transfers between servers. So I needed a secure copy method (SCP) without prompting for a password (SSH keys). I’ll call my two systems production and backup. I need to be able to ssh from production to backup without it prompting for a password.

On production generate your private/public key pair:

chris@production ~$ ssh-keygen -t dsa

Generating public/private dsa key pair.
Enter file in which to save the key (/export/home/chris/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /export/home/chris/.ssh/id_dsa.
Your public key has been saved in /export/home/chris/.ssh/id_dsa.pub.
The key fingerprint is:
bd:cf:bb:c0:30:1c:c3:5f:74:80:3b:f0:1f:82:20:bb chris@production

Put the public key file (id_dsa.pub) on the remote system you will be ssh’ing to as the authorized_keys2 file in the .ssh directory of the user you will be using to ssh:

chris@production ~$ scp ~/.ssh/id_dsa.pub backup:.ssh/authorized_keys2

Or append it if you have a preexisting authorized_keys2 file.

That’s it. You should be able to ssh from production to backup with whatever password you entered in the key generation process (or none if you didn’t enter one).

How to lock yourself out of OS X

March 12, 08 by cjgibbs
$ sudo service com.apple.DirectoryServices stop

Not fun.

Creating Solaris Containers (zones)

March 15, 07 by cjgibbs

So I know there is ample documentation on this in the Sun docs but if you’ve ever tried to read Sun docs then you know that someone giving an example is much easier to understand. The goal will be to create a container in the fewest number of steps. This should work on any release of Solaris 10 but I will be using u3. Read the rest of this entry »

Using Solaris 10 as a firewall/router

February 24, 07 by cjgibbs

In this scenario I am using a fresh install of Solaris 10 u3. There are two network interfaces configured: vfe0 is the “external” interface as it connects directly to the cable modem and gets it’s IP via DHCP; rtls0 is the “internal” interface as it connects to a local network switch along with other computers on the network. Use routeadm to enable IP Forwarding & IP Routing at the system level: Read the rest of this entry »