Shell Programming

Automatic telnet on shell programming

Sometimes you want to execute script on your another server automatically without rsh. What you usually do is telnet to that server and execute the script. But how to make it automatic ?

You can use the tricky method bellow

Asume your server target is and you want to execute

(sleep 1
echo username
sleep 1
echo password
sleep 1
echo “/home/hnawri/”
sleep 1
sleep 1
exit) | telnet



One thought on “Automatic telnet on shell programming

  1. Thanks for this! I looked for such a solution for a really long time. Can you add a short explanation of why this works?

    Posted by pepper23blues | July 22, 2008 3:10:56, 3:10 pm

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


Twitter Updates

Error: Please make sure the Twitter account is public.

%d bloggers like this: