#!/usr/bin/perl use strict; use Expect; my $user="user"; my $source_DB="source"; Expect->spawn("ssh $User\@$source_DB"); Expect->interact;