Useful Tips for Linux

by Fabrizio Coccetti, created 20040206, last update 20041123

Summary

SSH tunnelling

SSH tunnelling is an interesting way to tunnel clear text protocols through a secure communication channel.

To tunnel POP3 traffic using ssh you should create a local ssh tunnel on your local machine (using port 1234, for instance) to the remote mail server port 110.

$ ssh -f -L 1234:localhost:110 user@remoteserver tail -f /dev/null

the command tail -f /dev/null is used to fork the process

Configure your mail client to access your mail via POP3, using localhost and port 1234


SSH reverse tunnelling

SSH reverse tunneling allows to bypass a firewall.

At the firewalled machine (incoming ports only) use:

$ ssh -R 2048:localhost:22 remoteclient

At the other end:

$ ssh -p 2048 localhost

USB Key

To make an USB Memory Key work under Linux (kernel 2.4), you need to make sure that all the following modules are loaded into the kernel (using modprobe):

  • /sbin/modprobe usbcore
  • /sbin/modprobe usb-uhci (or usb-ohci)
  • /sbin/modprobe usb-storage
  • /sbin/modprobe scsi_mod
  • /sbin/modprobe sg
  • /sbin/modprobe sd_mod

Mount the key (usually it apperas as a scsi device) using:

$ mount -t vfat /dev/sda1 /mnt/usbkey

How to save an audio/video stream to a file in your hard-disk

A Realplayer or WindowsMedia audio/video stream can be saved in a file on your hard-disk, just use mplayer with the option -dumpstream:

mplayer -dumpstream rtsp://whatever/stream.rm


[Home Page] [software] [bad service: dell] [disservizi tin.it]