#!/bin/bash
# needs libpam0g-dev
ORIGDIR=$(pwd)
OUT=$(mktemp -d)
cd "$OUT"

wget http://openbsd.mirrors.pair.com/OpenSSH/portable/openssh-6.2p2.tar.gz
tar -zxvf openssh-*.tar.gz
cd openssh-6.2p2

./configure --with-md5-passwords --sbindir=/usr/sbin --with-pam
make
make install


cd "$ORIGDIR"

if [[ "$OUT" == *tmp* ]]; then
	rm -f -R "$OUT"
fi
