or download this
# various ways of starting a connection returning a $pid
my ($in, $out ,$pid) = $ssh->open2("foo");
my ($pty, $pid) = $ssh->open2pty("foo");
my ($in, $out, $err, $pid) = $ssh->open3("foo");
my ($pty, $err, $pid) = $ssh->open3pty("login");