Bash script - telnet

  • Follow


Hi masters!
I need a telnet script in bash. I need to log in a remote site for
executing certain commands & tasks (remotely). Can somebody share a
script like this? I use Debian Woody.

Regards & thanks
0
Reply maramire 5/26/2004 11:02:24 PM

On 2004-05-26, Tokito wrote:
> Hi masters!
> I need a telnet script in bash. I need to log in a remote site for
> executing certain commands & tasks (remotely). Can somebody share a
> script like this? I use Debian Woody.

   Use ssh instead of telnet.

-- 
    Chris F.A. Johnson                  http://cfaj.freeshell.org/shell
    ===================================================================
    My code (if any) in this post is copyright 2004, Chris F.A. Johnson
    and may be copied under the terms of the GNU General Public License
0
Reply Chris 5/26/2004 11:06:36 PM


On Wed, 26 May 2004 16:02:24 -0700, Tokito wrote:

> Hi masters!
> I need a telnet script in bash. I need to log in a remote site for
> executing certain commands & tasks (remotely). Can somebody share a
> script like this? I use Debian Woody.
> 
> Regards & thanks

One needs rather more information on what you actually mean. It could be
that

{ sleep 1
echo username
sleep 3
echo password
sleep 3
echo Command and args to run
sleep 20
echo exit
sleep 1
} | telnet remote_host

will do what you want. On the other hand you might be asking us to
implement the telnet protocol using /dev/tcp/remote_host/remote_port and
the 'read' command, which is a different task.


0
Reply Icarus 5/27/2004 6:51:27 AM

2 Replies
834 Views

(page loaded in 0.045 seconds)

Similiar Articles:













7/21/2012 7:20:23 PM


Reply: