русский

Latest news : Lazy Geek 0.9 released

Public key authentication support
Just save you key as /sdcard/Lazy geek/keys/username@hostname.key

New ways to set password
ssh_password variable: set ssh_password mypassword
spawn connection string spawn ssh user:mypassword@server.com
If no password is set, you'll be promted for it during each execution.

Configurable timeout
Simply set timeout variable in milliseconds: set timeout 5000

Lazy Geek

What is Lazy Geek?
Lazy Geek is an Android application which allows automating interaction with remote hosts via telnet or ssh. Lazy Geek acts like the popular UNIX application expect and uses similar (but reductive indeed) script syntax.

How does it work?

Lazy Geek uses scripts stored in SD Card folder «/sdcard/Lazy Geek» — folder will be created automatically while first launch.
All scripts will be found automatically while next launch.

What for?

Lazy Geek allows to turn your mobile-phone into computer control panel and to make implementation of routine tasks more comfortable: turning on/off computers and particular services, «wise» office or house info structure management, etc.
Thus there is no need to have computer with telnet/ssh client nearby.

Scripts?

Lazy Geek uses simple scripts with syntax similar to expect. There are few examples below.

Telnet script: SSH script:
# Comment goes here
## title = Open the entrance door

spawn telnet reception.elegion.local:23 # open telnet connection
send "open" # send command to remote host
expect "opened" # wait until get answer from remote host 
exit 0 # exit from script
##title = SSH example (user@server.com)
#set ssh_password secretpassword

spawn ssh user@server.com:22
#spawn ssh user:secretpassword@server.com:22

send "cd ~"
send "touch test.txt"
send "echo test >> test.txt"
send "ls"
#Expect timeout is 5000ms by default, changing it to 1 sec
set timeout 1000
expect "test.txt"
exit

Let’s look closer:
# — string that starts with this char is a comment and is ignored by interpreter.
## — script attributes. These strings are also ignored while execution but have application required meta-data.
In case of attribute "title" — using it we have script title in the moment when script is displayed on Android phone.

spawn telnet reception.elegion.local:23 — connect via telnet to reception.elegion.local port 23.
Syntax: spawn {protocol} [username[:password]@]{address}[:{port}]
In case of ssh, authentication credentials are taken from spawn string or from "ssh_user" and "ssh_password" variables.

set variable value — set value for variable (currently supported: timeout, ssh_user, ssh_password).
send "open" — send command.
expect "opened" — wait for server answer containing the string.
exit — close connection with server.

© 2009 e-Legion Ltd.