SSH on a PlayBook / Smartphone

I’ve been using WebShell (http://www-personal.umich.edu/~mressl/webshell/) for a while now. Great little tool, very easy to setup and easy to use.

To use it, download it and stick it somewhere in your filesystem. You’ll need to have python (2.3+) and optionally OpenSSL.

I then (on Gentoo) created the below little script in /etc/init.d/webshell:

#!/sbin/runscript

PID="/var/run/webshell.pid"

depend() {
        need net
        use dns logger
}

checkconfig() {
        return 0
}

start() {
        checkconfig || return 1
        ebegin "Starting ${SVCNAME}"
        start-stop-daemon --start --exec /var/www/WebShell-0.9.6/webshell.py \
                -c nobody \
                -- "-i" "10.1.1.1" "--ssl-disable" "-d"
        eend $?
}

stop() {
        ebegin "Stopping ${SVCNAME}"
        if [ -f ${PID} ]; then
                start-stop-daemon --stop --pidfile ${PID}
        else
                ewarn "Couldn't found ${PID} trying to stop over the process name ${SVCNAME}"
                start-stop-daemon --stop --name ${SVCNAME}
        fi
        eend $?
}

Where 10.1.1.1 is the IP of the host.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s