Thursday, February 21, 2008

How to use ssh through a proxy in Ubuntu

This time i had to connect through an http proxy to other machines using ssh, this took me some investigation, mather that i like ;-)

First i downloaded the connect-proxy package, the source code is also available but i had problems while compiling it, so i downloaded it from here:
http://archive.ubuntu.com/ubuntu/pool/universe/c/connect-proxy/connect-proxy_1.95-3_i386.deb

I had to download it withe Firefox, because i was behind a proxy and do not had still the possibility to download other ways. wget probably accepts a proxy argument, but i used the fastest way.

Then, i installed it:
dpkg -i /home/walter/connect-proxy_1.95-3_i386.deb

Then, create a file ~/.ssh/config, whit this:
---
Host *
ProxyCommand connect-proxy -H proxy2.your.proxy.com:8080 %h %p
---

Finally, test the connection:
ssh -F .ssh/config mysite.argentina.com.ar -p 2210

And i did a tunnel to another application:
ssh -F .ssh/config -g -L 8000:192.168.2.1:2211 mysite.argentina.com.ar -p 2210

For more information about how to do a tunnel, see my previous post:
Secure Tunnel

Sunday, February 17, 2008

Uninstalling packages in Ubuntu/Kubuntu

Ubuntu linux flavors use APT as package management, a very good package management and from which most people speak very good.

To uninstall a package you may want to remove, i use to do this:
dpkg --list | grep [package name]
apt-get remove [package name]

Saturday, February 09, 2008

Error: No Package Matching glibc.x86_64

In Centos 5.1 and Fedora is a bug reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=228430

The work arround is this:
vi /etc/yum.repos.d/CentOS-Base.repo

Add this repository:
[c5-base32]
name=CentOS-5
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=$i386&repo=os
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5



And then:
yum install glibc glibc.i386 --enablerepo=c532*

Installing FluxBox on RHEL or Fedora

Fluxbox is a lightweight desktop for linux, i want to test it.

First, download Fluxbox.
wget http://newrpms.sunsite.dk/apt/redhat/en/i386/fc3/RPMS.newrpms/fluxbox-0.9.13-1.rhfc3.nr.i386.rpm

If while installing it, you get this errors:
Error: Missing Dependency: libImlib2.so.1 is needed by package fluxbox
Error: Missing Dependency: pyxdg is needed by package fluxbox

Get the required packages:
wget http://hany.sk/mirror/fedora/releases/8/Everything/x86_64/os/Packages/imlib2-1.4.0-3.fc8.i386.rpm
yum install imlib2-1.4.0-3.fc8.i386.rpm

wget ftp://ftp.univie.ac.at/systems/linux/dag/redhat/el5/en/x86_64/RPMS.dag/python-xdg-0.15-1.el5.rf.noarch.rpm
yum install python-xdg-0.15-1.el5.rf.noarch.rpm

Now install fluxbox:
yum install fluxbox-0.9.13-1.rhfc3.nr.i386.rpm

You also need Xorg:
yum install xorg-x11-xinit
yum install xorg-x11-server-Xorg
yum install sytem-config-display

And dont forget to install all the fonts, else you wouldnt see anything
yum install xorg-x11-fonts*

Friday, February 08, 2008

Error while installing IBM Websphere

If you want to install IBM Websphere and get this error:

package.java.jre/java/jre/bin/libj9thr23.so: cannot restore segment prot after reloc: Permission denied

This happens when you have SELinux enabled, there are surely more elegant solutions, but disabling it would be a work around:
setenforce 0

To disable it permanently edit /etc/sysconfig/selinux in RHEL.