#!/bin/bash
DIR=$(pwd)
# [ -z "$1" ] && echo "usage: $0 <host> [<cmd> <arg> ...]" && exit 1
if [ -z "$1" ]; then
	HOST=panda
else
	HOST=$1
fi
shift

if [ ! -z "$1" ]; then
    exec ssh $HOST "cd $DIR ; exec $*"
else
    exec ssh $HOST -t "cd $DIR ; exec bash -i"
fi
