# TELNET script ?



## vikrant321 (Aug 27, 2004)

I need to build a script performing TELNET and some actions within the TELNET. How do I send a command to the TELNET client (starting User & Password) ? How do I make it think I typed this command from keyboard.


----------



## tsunam (Sep 14, 2003)

telnet is terribly insecure...if you want to connect/ do anything on a network might i suggest using ssh for it...not any more difficult and its included within linux..if you are connectiong to a windows machine...vpn..


----------



## Whiteskin (Nov 16, 2002)

I wouldn't let telnet touch my personal files with a tenfoot stick. Stick to SSH.


----------



## tdi_veedub (Jan 29, 2004)

Even SSH has its faults if you are not careful. Things I have done to my SSH server to help secure it:

Run it on a non-standard port. Preferably in the high range so that at least the cheesy port scanners and lame *** kiddie scripts don't see it.

Disable the root login. OpenSSH has it enabled by default.

Add the following lines to your hosts.deny file:

ALL: kornet.net
ALL: pubnet.kr

A TON of SSH scans and HTTPD exploits orginate from those two domains.

If you use password authentication. USE SECURE PASSWORDS!!! At least 8 characters long, NOT a word, at least ONE special character, mix of upper-case and lower-case letters, and at least ONE numerical character.


----------



## tsunam (Sep 14, 2003)

good advice tdi_veedub


----------



## 141191 (Sep 12, 2004)

This is more a direction than a real tip. When I was working in a carrier company, many (some thousands) equipment were only telnet capable, no ssh at all.
I'm not a programmer, to be honest -- I hate it... but I could find a workable solution playing on PERL. I was able to issue commands from a server and catch the output for every single stup** router on that dawn network...
Man, I get tired even when I think about it.

The only thing I remember now is: Perl will only work if you load the proper libraries to handle telnet.

I hope it could help. Cheers


----------

