$list=$ARGV[0]; if ($list eq "list") { my $chan = $ssh2->channel(); $chan->blocking(1); $chan->shell(); print $chan "cd ..\n"; print $chan "ls\n"; print " $_" while <$chan>; print "Type the name of the directory you would like to enter: "; my $dir = ; print $chan "cd '/'$dir\n"; print $chan "ls\n"; print " $_" while <$chan>; } $delete=$ARGV[1]; if ($delete eq "delete") { unlink($delete_file); } $upload=$ARGV[2]; #Send file if ($upload eq "upload") { $ssh2->scp_put($upload_local,$upload_remote) or warn "Could not copy the file"; } $download=$ARGV[3]; #Get file if ($download eq "download") { $ssh2->scp_get($download_remote, $download_local) or warn "Could not copy the file"; }