in reply to Remote SSH to linux Server without using Module

See open or IPC::Open3. With either, you can work interactively with the ssh process. But I recommend either launching Perl on the other side or launching a single process on the other side which produces all its output, so you should just do:

my $output = `ssh $host '$command'`;