sub ssh {
    my $textfin = '';
    $textfin = "Protocol mismatch.\n";
    
    print STDERR "$sshver\n\n";
    open(LOG, ">>$sesslog");
    while (my $commands = <STDIN>) {
        print LOG $commands;
        chomp $commands;
        $commands =~ s/\r//;
        @commands=split /\s+/,($commands);
   }
    print STDERR "$textfin";
    close LOG;
}
