A little bit of everything answered here. : serverSetup

HomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

Howto's for OpenBSD


Setting up an SSH tunnel

ssh -2 -N -f -L 192.168.0.10:8888:172.16.0.10:80 root@localhost

-2 forces ssh version 2
-N Do not execute a remote command. This is useful for just forwarding ports (protocol version 2 only).
-f forces ssh to run in the background
-L [bind_address:]port:remote_host:hostport
root@localhost is the user that you create the connection with

Setting up package management

# uname -a
OpenBSD serv0.cmsws.com 4.3 GENERIC#698 i386
# PKG_PATH=ftp://ftp.usa.openbsd.org/pub/OpenBSD/4.3/packages/i386/
# export PKG_PATH
# pkg_add rsync


Different CLI options

find ./ -type f -name "*.jpg" | sed -e "s/\(.*\)/\"\\1\"/" | xargs rm


Crontab layout
When issued as "crontab -e" this is the correct format

minute (0-59)
|   hour (0-23)
|   |   day of the month (1-31)
|   |   |   month of the year (1-12 or Jan-Dec)
|   |   |   |   day of the week (0-6 with 0=Sun or Sun-Sat)
|   |   |   |   |   commands
|   |   |   |   |   |
#### Sunday at midnight
0   *   *   *   *   /bin/sh somecommandhere


When issued as "crontab -e" this is the correct format

minute (0-59)
|   hour (0-23)
|   |   day of the month (1-31)
|   |   |   month of the year (1-12 or Jan-Dec)
|   |   |   |   day of the week (0-6 with 0=Sun or Sun-Sat)
|   |   |   |   |   user account to run command as
|   |   |   |   |   |    commands
|   |   |   |   |   |    |
#### Sunday at midnight
0   *   *   *   *   root /bin/sh somecommandhere


How to mount different things

1. mount CDROM
# mkdir /mnt/cdrom
# echo "/dev/cd0a /mnt/cdrom cd9660 ro,nodev,nosuid,noauto 0 0" >> /etc/fstab
#mount /mnt/cdrom

2. mount iso
# vnconfig svnd0 /usr/local/share/4.1.iso
# mount -t cd9660 /dev/svnd0c /mnt/cdrom

3. mount usb
# mkdir /mnt/usb
# mount_msdos /dev/sd0i /mnt/usb

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.2
Page was generated in 0.1688 seconds