Public/private key authentication with SSH

SSH is a protocol that enables secure logins to your computer over a network. SSH supports the use of public/private key pairs for user authentication. Private keys are kept locally, while public keys are stored on the remote machine.

On the Local Machine

Use the command ssh-keygen -t dsa to generate a key pair for the local user. Use an appropriate passphrase to secure your private key (don’t be tempted to use an empty passphrase).
Set the permissions for the private key file with the following command:

user@ubuntu:~$ chmod 600 ~/.ssh/id_dsa

On the Remote Machine

Get the necessary packages with the following command:

user@ubuntu:~$ sudo apt-get install ssh

Copy the public key file ~/.ssh/id_dsa.pub from the local to the remote machine.

On the remote machine, move and rename the file with the following command:

user@ubuntu:~$ mv id_dsa.pub .ssh/authorized_keys2

Set the permissions for the file with the following command:

user@ubuntu:~$ chmod 600 ~/.ssh/authorized_keys2

Add the user user to the group ssh:

user@ubuntu:~$ sudo adduser user ssh

Get the file sshd_config and move it to /etc/ssh/:

user@ubuntu:~# sudo wget "http://edafe.org/wp-content/uploads/2006/09/sshd_config"
user@ubuntu:~# sudo mv sshd_config /etc/ssh/

The downloaded file contains the following changes from the Ubuntu default configuration:

LogLevel VERBOSE

AllowGroups ssh
LoginGraceTime 20
PermitRootLogin no
MaxAuthTries 1

RSAAuthentication no

PasswordAuthentication no

X11 Forwarding no
TCPKeepAlive yes
ClientAliveInterval 15
ClientAliveCountMax 3

MaxStartups 3

UsePAM no

Setting these options makes root logins impossible. Only users belonging to the group ssh may establish a connection. Access to the remote machine is strictly tied to the private key and the passphrase used to encrypt it.

Next, restart the SSH server on the remote machine with the following command:

user@ubuntu:~$ sudo /etc/init.d/ssh restart

You should now be able to log into the remote machine using the private key stored on the local machine:

user@ubuntu:~$ ssh remote.machine
Enter passphrase for key '/home/user/.ssh/id_dsa':

The book SSH The Secure Shell by Daniel Barrett, Richard Silverman and Robert Byrnes is useful as a reference text and has information on other clever stuff you can do with SSH.
www.ibm.com/developerworks/linux/

OOo off the wall

OpenOffice.org is a multi-platform application. These articles, written by Bruce Byfield for Linux Journal, are also applicable to OpenOffice.org installations on other platforms.

Setting up page styles in OOo Writer, Bullet proof templates, Style is everything, right?, Fonts of wisdom, Building characters, Shooting the sun, Paragraph styles, Part II, It’s numbering, but not as we know it, Getting in the frame, The outlining and the ecstasy, Macros and add-ons, Floating windows, My objects all sublime, ToCs, indexes and bibliographies in OOo Writer, Fielding questions Part 1 Part 2 Part 3 Part 4, Tabling the notion Part 1 Part 2, Recovering hidden treasures, Back to school with bibliographies, Adding AutoText to your work flow, Domesticating Autocorrect, Master documents, Find and replace, That’s your version-document control in OOo Writer, Paragraph and page spacing, Automating the creation of slide shows, Using master slides, Extensions for OOo Draw, Template collections, New add-ons for OOo Writer, Text flow in OOo Writer, Basic arithmetic and statistic functions, Creating business cards, Rounding off numbers, Pivot tables by another name, Writer’s tools, Extensions for OOo Impress’s tools, Manipulating lists in OpenOffice.org Calc

VDR

VDR stands for Video Disk Recorder, the outstanding software project by Klaus Schmidinger. VDR turns a PC equipped with suitable hardware into a digital receiver and timer-controlled video disk recorder. Its features include time-shifting and on-disk editing of the recordings. Support for the different types of DVB standard is dependent on the hardware employed to receive the broadcast signal(s). This means that, given the right kind of receiver card(s), VDR will work with cable, satellite and terrestial television.
www.tvdr.de

Building the Freeview VDR

These instructions are intended to help you build a system that will receive both digital terrestial and satellite transmissions. Personally, I use a setup that enables me to watch and record broadcasts on Freeview, the terrestial service here in the United Kingdom, and Astra 19.2° East, a satellite transmitting to the whole of Europe. Some of the most frequently asked questions about the Freeview VDR are answered on a separate page.
In addition to an aerial and a satellite dish, you require a PC equipped with a large enough hard drive to store your recordings. Keep in mind that a one hour recording will take up approximately 1.5 GB of disk space.
You also need one DVB-S card of the type TechnoTrend Premium S, one DVB-T card of the type TechnoTrend Budget T and the ATI Remote Wonder remote control. You should also have a working broadband connection accessed from behind a router/firewall.

Installing Slackware

Slackware Linux is ideal for the purpose: It is easy to install and very dependable. Download the file slackware-10.2-install-d1.iso from one of the Slackware mirrors and burn the ISO image to disk. Alternatively, you can help support Slackware and the effort that goes into it by ordering your set of CDs from The Slackware Store.

Install Slackware with: a) a swap partition that is equal in size to that of the installed RAM, b) a root partition of 3 GB, and c) a /video partition taking up all of the remaining disk space. Select the software sets a, ap, d, k, l and n for installation. Configure a network interface with access to the internet. Set the system time to synchronise with NTP.
Add the user vdr, with the default group video and a home directrory located at /etc/vdr. Finish by changing the owner and group of /video:

darkstar:~# chown -R vdr.video /video/

Installing the Drivers

The Linux driver for the DVB-S card requires that the file Sc_main.mc, which is distributed as part of the TechnoTrend driver for Windows, be located in /usr/lib/DVB/driver/frontends.
Start by downloading the driver for the TechnoTrend Premium S card and unzipping the archive file:

darkstar:~# lftp -c "get http://www.technotrend.de/new/217g/tt_Premium_217g.zip"
darkstar:~# unzip tt_Premium_217g.zip

Use the following set of commands to place a copy of SC_MAIN.MC in /usr/lib/DVB/driver/frontends:

darkstar:~# mkdir -p /usr/lib/DVB/driver/frontends
darkstar:~# cp software/OEM/HE/App/boot/SC_MAIN.MC /usr/lib/DVB/driver/frontends/Sc_main.mc

If you are using the TechnoTrend Budget T card, download the required firmware and place a copy in /etc/dvb:

darkstar:~# lftp -c "get http://www.edafe.org/vdr/firmware/tda1004x.mc"
darkstar:~# mkdir /etc/dvb
darkstar:~# cp tda1004x.mc /etc/dvb/

Continue by downloading the Linux-DVB driver source and unpacking the tarball:

darkstar:~# lftp -c "get http://linuxtv.org/downloads/linuxtv-dvb-1.0.1.tar.gz"
darkstar:~# tar -zxvf linuxtv-dvb-1.0.1.tar.gz

Move the resulting directory to /usr/local/src/, renaming it to DVB:

darkstar:~# mv linuxtv-dvb-1.0.1 /usr/local/src/DVB

Change to the DVB directory, build the drivers and then run the makedev.napi script:

darkstar:~# cd /usr/local/src/DVB/
darkstar:/usr/local/src/DVB# make
darkstar:/usr/local/src/DVB# driver/makedev.napi

Change to the driver directory and run the command make insmod while observing the TV-output of your DVB-S card:

darkstar:/usr/local/src/DVB# cd driver/
darkstar:/usr/local/src/DVB/driver# make insmod

If the driver installed successfully, this message will appear and then fade:

(C) 2001 Convergence integrated media

Scanning for Satellite Channels

Check the dvb-s directory to see what configuration files are available and determine which one to use:

darkstar:~# ls /usr/local/src/DVB/apps/scan/dvb-s/

Run the following set of commands, replacing Astra-19.E as necessary:

darkstar:~# cd /usr/local/src/DVB/apps/scan/
darkstar:/usr/local/src/DVB/apps/scan# ./scan -o vdr dvb-s/Astra-19.E > /etc/vdr/sat.conf

Scanning for Terrestial Channels

Download the source for Winfried Köhler’s w_scan application and unpack the tarball:

darkstar:/usr/local/src/DVB/apps/scan# cd ~
darkstar:~# lftp -c "get http://free.pages.at/wirbel4vdr/w_scan/w_scan-20060729.tar.bz2"
darkstar:~# tar -xjf w_scan-20060729.tar.bz2

Move the resulting directory to /usr/local/src/, renaming it to WSCAN:

darkstar:~# mv w_scan-20060729 /usr/local/src/WSCAN

Use the pre-compiled version of w_scan that is included in the tarball to scan for available DVB-T channels:

darkstar:~# /usr/local/src/WSCAN/w_scan -o2 ›› /etc/vdr/ter.conf

Generating Channels.conf

Employ cat to create a single channels.conf file:

darkstar:~# cd /etc/vdr/

darkstar:/etc/vdr/# cat sat.conf ter.conf › channels.conf
If you are only using a single input source, rename either sat.conf or ter.conf to channels.conf.

Installing VDR

Continue by downloading the VDR source and unpacking the contents of the tarball:

darkstar:/usr/local/src/DVB/apps/scan# cd ~
darkstar:~# lftp -c "get ftp://ftp.cadsoft.de/vdr/vdr-1.2.6.tar.bz2"
darkstar:~# tar -xjf vdr-1.2.6.tar.bz2

Move the resulting directory to /usr/local/src/, renaming it to VDR:

darkstar:~# mv vdr-1.2.6 /usr/local/src/VDR

Change to the VDR directory and copy the configuration files to /etc/vdr/:

darkstar:~# cd /usr/local/src/VDR/
darkstar:/usr/local/src/VDR# cp keymacros.conf sources.conf svdrphosts.conf svdrpsend.pl /etc/vdr/
darkstar:/usr/local/src/VDR# chown vdr.video /etc/vdr/*

Build the VDR application with support for Linux Infrared Remote Control:

darkstar:/usr/local/src/VDR# make REMOTE=LIRC VFAT=1 NO_KBD=1

Download this version of runvdr, preconfigured to work with your installation:

darkstar:/usr/local/src/VDR# lftp -c "get http://www.edafe.org/vdr/sh/runvdr"
darkstar:/usr/local/src/VDR# chmod +x runvdr

Download rc.vdr and move it to /etc/rc.d/:

darkstar:/usr/local/src/VDR# cd ~
darkstar:~# lftp -c "get http://www.edafe.org/vdr/sh/rc.vdr"
darkstar:~# chmod +x rc.vdr
darkstar:~# mv rc.vdr /etc/rc.d/

Add the following lines to the end of /etc/rc.d/rc.local for VDR to start at boot:

# Starting VDR
if [ -x /etc/rc.d/rc.vdr ]; then
  echo "Starting VDR"
  /etc/rc.d/rc.vdr &
fi

Restart your computer and observe the TV-output of your DVB-S card. You should now be viewing the first channel listed in your channels.conf file.

Installing LIRC

Connect the USB receiver for the ATI Remote Wonder to your VDR. Download lircd.conf, preconfigured with the settings for the ATI Remote Wonder, and place it into /etc/.

darkstar:~# lftp -c "get http://www.edafe.org/vdr/conf/lircd.conf"
darkstar:~# mv lircd.conf /etc/

Continue by downloading LIRC source and unpacking the contents of the tarball:

darkstar:~# lftp -c "get http://www.edafe.org/vdr/tar/lirc-0.7.2.tar.bz2"
darkstar:~# tar -xjf lirc-0.7.2.tar.bz2

Move the resulting directory to /usr/local/src/, renaming it to LIRC:

darkstar:~# mv lirc-0.7.2 /usr/local/src/LIRC

Change to the LIRC directory and launch the LIRC installer with:

darkstar:~# cd /usr/local/src/LIRC/
darkstar:/usr/local/src/LIRC# ./setup.sh && make install

Choose the following options:
1 Driver configuration > 8 USB devices > 1 ATI RF Remote
2 Software configuration > no selection
3 Save configuration & run configure

Set the permissions for the device /dev/lircd with:

darkstar:/usr/local/src/LIRC# chmod 666 /dev/lircd

Add the following lines to /etc/rc.d/rc.local, before the entry for VDR, to start LIRC at boot:


# Starting LIRC daemon
if [ -x /usr/local/sbin/lircd ]; then
  echo "Starting LIRC"
  /usr/local/sbin/lircd
fi

Restart your computer and observe the TV-output of your DVB-S card. You should now see the following message:

Learning Remote Control Keys (LIRC)
Phase 1: Detecting RC code Type
Press any key on the RC unit

Follow the instructions of the OSD to define the keys for the remote control.

Documentation

VDR Wiki

In English and German
Online reference covering many aspects of the VDR. Useful if you want to further expand the functionality of your Freeview VDR or learn about other options for setup.
www.vdr-wiki.de

Help

VDR Portal

In English and German
Interact with other VDR users to help with your questions.
www.vdrportal.de