The shell script is failing because the tail, tar and install commands are not present on the machine to which you are connected. This is nothing to do with telnet - it's because those commands need to be installed. The system seems to be using busybox which provides some of the standard Linux commands but not all. So you need to get those three commands installed and then try again to run the script. Which distro are you running on?