Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Friday, January 14, 2011

Convert OpenSSH RSA or DSA key to PEM format

RSA to PEM

First create an RSA key using OpenSSH tools:

$ ssh-keygen -t rsa

Then converted it to PEM format:

$ openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem

DSA to PEM

First create an DSA key using OpenSSH tools:

$ ssh-keygen -t dsa

Then converted it to PEM format:

$ openssl dsa -in ~/.ssh/id_dsa -outform pem > id_dsa.pem

Sunday, October 4, 2009

Linux Ethernet Bridge

The Linux ethernet bridge can be used for connecting multiple ethernet devices together. The connection is fully transparent: hosts connected to one ethernet device see hosts connected to the other ethernet devices directly.

Requirements:
  1. Two Physical (Real) Network Card (NIC) (minimum)
  2. bridge-utils - This package contains utilities for configuring the Linux ethernet bridge.
Steps:
1. Zero IP the interfaces.
        # ifconfig eth0 0.0.0.0
        # ifconfig eth1 0.0.0.0

                OR

        # ifconfig eth0 up promisc
        # ifconfig eth1 up promisc


2. Create the bridge interface.
        # brctl addbr br0

3. Add interfaces to the bridge.
        # brctl addif br0 eth0
        # brctl addif br0 eth1

        OR

        # brctl addif br0 eth0 eth1

4. Put up the bridge.
        # ifconfig mybridge up

5. The virtual interface br0 can also be configured to take part in network. It behaves like real interface (like a normal network card).
        # ifconfig br0 192.168.200.100 netmask 255.255.255.0