Ask A Question
 
soumitra
Fresh Boarder
Blog Posts: 0
Forum Posts: 8
Rating: 0ApplaudCriticize
Posted 1 Year, 6 Months ago #1
This is probably a little far-fetched. Is there a way to do a batch telnet? In other words, from an NT command line, telent in, and run a compile command (gcc)?

There are other reasons that I want to do this, such as gather stats from multiple servers, shutdown services on multiple services from one script, etc.

Thanks for any advice.
Answer
Woodstock
Fresh Boarder
Blog Posts: 0
Forum Posts: 12
Rating: 0ApplaudCriticize
Posted 1 Year, 6 Months ago #2
Use SSH. It's secure (more or less and there are also clients for Windows (ask Google for 'putty'.

Regards,
Answer
laju
Fresh Boarder
Blog Posts: 0
Forum Posts: 14
Rating: 0ApplaudCriticize
Posted 1 Year, 6 Months ago #3
Yes indeed, I strongly recommend that you use SSH and /not/ Telnet. It's unwise to have a Telnet server anywhere nearby. Someone's bound to use it, and a sniffer is sure to find a password that way. (It only takes one!)
Answer
nfdouglas
Fresh Boarder
Blog Posts: 0
Forum Posts: 10
Rating: 0ApplaudCriticize
Posted 1 Year, 6 Months ago #4
well... I guess you could put cygwin on the NT box and use 'expect' to do the work of replacing the hands and mind at the keyboard.

On the other hand, if you put the startup into a shell script file on the Linux end and called it from the .profile then things would probably be more stable, etc.

and unless you are on a LAN segment that you know is secure, you might want to use SSH instead of telnet.

And you might want to put enough stuff into a Makefile that all the command needs to do is run make.
Answer
johndippel
Fresh Boarder
Blog Posts: 0
Forum Posts: 9
Rating: 0ApplaudCriticize
Posted 1 Year, 6 Months ago #5
It is a pretty secure network and I am not goingto immediately worry about security.

I can't seem to find the syntax anywhere. If someone could post a simple example, I'd be grateful.
Answer
Nunikares
Fresh Boarder
Blog Posts: 0
Forum Posts: 10
Rating: 0ApplaudCriticize
Posted 1 Year, 6 Months ago #6
Which command can't you find an example of? This problem has arisen because you are top-posting, which always scrambles Usenet communications.

Example for ssh:

# ssh (machine-name) (command)

Specific:

# ssh client-machine wall HELLO!

This exmaple works best if you have published access keys to the client machine, because no authentication is required. Read about this in 'man ssh'.

There is no similarly simple example for Telnet. I recommend ssh for two
Answer
Meta-Memestream
Fresh Boarder
Blog Posts: 0
Forum Posts: 11
Rating: 1ApplaudCriticize
Posted 1 Year, 6 Months ago #7
: : I can't seem to find the syntax anywhere. If someone could post a : simple example, I'd be grateful. : For Kermit you can find numerous example scripts here:
http://www.columbia.edu/kermit/ckscripts.html

For example:
ftp://kermit.columbia.edu/kermit/scripts/c-kermit/ autotelnet

- Frank
Answer
sophia8
Fresh Boarder
Blog Posts: 0
Forum Posts: 10
Rating: 0ApplaudCriticize
Posted 1 Year, 6 Months ago #8
Look at the weather application that comes with expect. It will work anywhere where expect works.
Answer
mystic_moose
Fresh Boarder
Blog Posts: 0
Forum Posts: 7
Rating: 0ApplaudCriticize
Posted 1 Year, 6 Months ago #9
C-Kermit includes a scripting language and can speak telnet.
Answer
10stone5
Fresh Boarder
Blog Posts: 0
Forum Posts: 3
Rating: 0ApplaudCriticize
Posted 1 Year, 6 Months ago #10
NT? Erhm... no idea. If you can use a linux box, look at the telnet man page for the .netrc syntax. You can automate telnet and ftp that way.

An interesting hack that works on *nix (dunno about NT's telnet) is:

echo 'o mail.example.com 25 HELO client.example.com

DATA Subject: I quit

I quit. .' > commands telnet < commands

You can use telnet script'd that way. Or use expect.

I think some Windows telnet clients have a scripting capability, so check those out if you can't use *nix instead.
Answer

Spread the Word!

Four out of five users would recommend us to a friend. Shouldn't you?
Link to Us    Tell a Friend

Related Posts:

The Content on this site is provided for general information purposes only. Your use of the Content, or any part thereof, is made solely at Your own risk and responsibility. By entering this site you declare you read and agreed to its Terms, Rules & Privacy.
Copyright © 2006 - 2010 My Linux Gang