From owner-freebsd-security Tue Feb 19 16:18:10 2002 Delivered-To: freebsd-security@freebsd.org Received: from smtp.sambolian.net.nz (203-79-83-205.cable.paradise.net.nz [203.79.83.205]) by hub.freebsd.org (Postfix) with ESMTP id D635537B416 for ; Tue, 19 Feb 2002 16:18:00 -0800 (PST) Received: by smtp.sambolian.net.nz (Postfix, from userid 80) id 0E0EE10306; Wed, 20 Feb 2002 13:20:32 +1300 (NZDT) Received: from 192.168.0.1 ( [192.168.0.1]) as user andy@imap.sambolian.net.nz by webmail.sambolian.net.nz with HTTP; Wed, 20 Feb 2002 13:20:31 +1300 Message-ID: <1014164431.3c72ebcff08c3@webmail.sambolian.net.nz> Date: Wed, 20 Feb 2002 13:20:31 +1300 From: andy@sambolian.net.nz To: freebsd-security@freebsd.org Subject: SSH proxy MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.0 X-Originating-IP: 192.168.0.1 Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi I have a fbsd gateway at home through which I share our cable modem with my flatmates. They have their own boxes on the lan and ssh to them from work. At the moment we log into the gateway and from there ssh to the box we want. I have made a shell script to automate this, and have set it as the default shell for our accounts on the gateway. It all works well but I would like to know if there is a better way and also if there is a security rish with the way I have done it now. Here is the script.... #!/bin/sh echo echo --------------------------------------- echo ------------ SSH Proxy ---------------- echo --------------------------------------- echo SSH=/usr/bin/ssh DEFAULTUSER=`whoami` DEFAULTHOST=`cat ~/.sshproxyhost 2> /dev/null` echo -n Enter username [${DEFAULTUSER}]: read USERNAME echo -n Enter host [${DEFAULTHOST}]: read HOSTNAME if [ -z ${USERNAME} ]; then USERNAME=${DEFAULTUSER} fi if [ -z ${HOSTNAME} ]; then HOSTNAME=${DEFAULTHOST} fi if [ -z ${HOSTNAME} ]; then echo "Can not determine the hostname" exit 1 fi echo ${HOSTNAME} > ~/.sshproxyhost ${SSH} -l ${USERNAME} ${HOSTNAME} exit 0 cheers Andrew ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message