#!/usr/bin/env perl

use Expect;
use strict;
use IO::Pty;

sub do_ssh(
$$)
{
    my ($ssh, $host, $port, $user, $pass) = @_;
    my $ssh_cmd = "ssh -o StrictHostKeyChecking=no -i /dev/null -p $port $user@$host";
    my