# How to get telnet access to your gentoo machine

## lyonsd

I search the forums because I was trying to set this up on my machine.  I only found bits & pieces but no clear solution.

But I finally figured it out and thought I'd post this to fill in the gaps.

```

emerge sys-apps/xinetd net-misc/netkit-telnetd

 -- OR --

emerge sys-apps/xinetd net-misc/telnet-bsd

```

Perhaps somebody can explain the advantages/disadvantage of one vs the other.

You will now have two xinetd confiuration files, and one xinetd directory containing config files for different services...

```

# find /etc -name 'xinetd*' -print

/etc/xinetd.d

/etc/xinetd.conf

/etc/conf.d/xinetd

/etc/init.d/xinetd

```

/etc/init.d/xinetd is the startup script and doesn't need to be funked with.

/etc/conf.d/xinetd is the configuration file for the startup script and it doens't need to be funked with either.

You will need to make changes to /etc/xinetd.conf to get telnetd working...

Change this line...

```
       only_from       = localhost
```

to

```
#       only_from       = localhost
```

Then you will need to make changes to /etc/xinetd.d/telnetd...

Change this line...

```
        disable         = yes
```

to

```
        disable         = no
```

Now run

```
/etc/init.d/xinetd start
```

----------

## rev138

Is there a particular reason that you want telnet, rather than ssh?

-S

----------

## lyonsd

 *rev138 wrote:*   

> Is there a particular reason that you want telnet, rather than ssh?
> 
> -S

 

Because I'm an old-timer.  In fact, I like the Berkeley services even better.

----------

## kashani

There needs to be a better reason than old-timer. Telnet is just too insecure and has far too features compared to ssh. 

kashani

----------

## lyonsd

 *kashani wrote:*   

> There needs to be a better reason than old-timer.

 

It's good enough for me.  And that's as good a reason as you're going to get.

 *Quote:*   

>  Telnet is just too insecure and has far too features compared to ssh.

 

So?

Many people have posted questions on how to set up telnet on their machines.  I gave them an answer.

----------

## frostschutz

 *Quote:*   

>  *Quote:*   Telnet is just too insecure and has far too features compared to ssh. 
> 
> So?

 

If you want to use telnet instead of ssh, fine by me. But if you write a manual about it, or go around recommending telnet to people, you should keep in mind that there are those who don't know the difference. So at least mentioning that telnet comes with a certain risk because it's usually unencrypted and that there might be better solutions is quite important. If you don't, chances are that you recommended the wrong thing to people and/or that people start assuming that you don't know yourself.

I'm using telnet almost every day as well... only it does not connect to a shell, but to a Multi-User-Dungeon (online text adventure)  :Laughing: 

----------

## lyonsd

 *frostschutz wrote:*   

>  *Quote:*    *Quote:*   Telnet is just too insecure and has far too features compared to ssh. 
> 
> So? 
> 
> If you want to use telnet instead of ssh, fine by me. But if you write a manual about it, or go around recommending telnet to people, you should keep in mind that there are those who don't know the difference. So at least mentioning that telnet comes with a certain risk because it's usually unencrypted and that there might be better solutions is quite important. If you don't, chances are that you recommended the wrong thing to people and/or that people start assuming that you don't know yourself.

 

I did not recommend it to anyone.  I simply answered some questions on how to get it working.

----------

## Cocker68

ssh is not a substitute for telnet, but for rsh.

You can do things with telnet, which you cannot do with ssh.

E.g.

```
$ telnet smtp.local 25

Trying 192.168.17.1...

Connected to smtp.local.

Escape character is '^]'.

220 smtp.local ESMTP Postfix
```

A telnetd might be a backup for a (for whatever reason) dead sshd.  Remeber: if You don't use telnet it is not insecure by itself.  When You use it, You have to respect, that nothing is encrypted.

E.g.

```
# telnet deadssh.host

login: root

Password:

# /etc/init.d/sshd restart

# exit

# ssh deadssh.host

login: root

Password:

# passwd root
```

This might not match the original question, but I'm just sick of those, who permanently run

```
# grep -l telnet thread* | while read T; do echo "telnet is EVIL" >> "$T"; done
```

in the forums.

- Cocker :wq

----------

## rev138

 *Cocker68 wrote:*   

> You can do things with telnet, which you cannot do with ssh.

 

Yes, a telnet client can be a very useful tool. I don't see many benefits to running a telnet server, however.

----------

## reup

I'd like to jump on that as I have been posting around looking for a good telnet terminal WITH configurable toolbar. 

the only answers I  ever got were "don't use Telnet, use SSH" 

please go tell this to my company (Cisco System) and ask them to rewrite the few hundred system I monitor to change from telnet to ssh. 

in the mean time, does anyone knows of a telnet/console/terminal where the toolbar could be configure to have buttons that would send command into the telnet sessions ?

putty is good, but it open xterm, or aterm and those are not configurable. CRT, SecPanel are the same, you can chose wich terminal it is going to use, but none are configurable.

thanks

reup

----------

## Proteus

Well, under certain circumstances it might be ok to use telnet - as long as you are

aware of what is does and how and what it does not do.

But why in heaven do you want to setup a telnet server? If you only need to connect

to certain computers that don't run anything else but telnet you only need the client

files - not a server configuration.

Also, I think that "Don't use telnet, use ssh." is always the best first answer in a forum when

someone asks how to use telnet. As others have already tried to explain a lot of users

are not aware of the differences or telnet's problems (security related).

----------

## reup

Proteus,

I am looking for a client, not a server. just some client that would be configurable. I need to be able to click on a button that will sent a string to the telnet client and execute the string. 

a terminal like multi-gnome-terminal has a button bar, but it is not configurable, so I cannot create new buttons

imagine having to type a sequence like this : vn4##@l][! some douzaine time a day, you will understand why I need configurable buttons    :Laughing: 

by the way, this is not a joke, I really have a sequence exactly like this one !

reup

----------

## frostschutz

Hi,

is this a simple line based telnet server (i.e. all you can do is send commands, and get text replies for them), or does it require more complicated stuff like real terminal emulation (e.g. for text-based GUI and graphical menus like curses)?

In case of the simple server, you could use a MUD client (MUDs are online textadventure games that work over the telnet protocol). These do only support normal text over telnet, no complicated stuff, but they have very powerful features that are supposed to make gaming easier; you can highlight stuff, create aliases for commands that are too long to type, you can trigger commands depending on what the server sends you, and so on.

For a console based MUD client, there is games-mud/tf, for X11 there are several to choose from. Although using these for CISCO is a bit unusual, it might help you.

----------

## reup

I need a terminal to get the device answers, so just a command line would not be enough, but the only thing that goes back and forth are caracters. nothing else. basically I send : sysconfig -v and I look at the result. any terminal like xterm does it as I have the telnet client install, but the toolbar is not configurable on xterm so when it come to type "vn4##@l][! ", I cannot just press a button and have it send. not with xterm. 

I will try MUD, thanks for the tip

there was a great tool called gtelnet that was doing all that I need, like hyperterminal from M$, but it does not exist anymore. TermPro works great but it is not possible to convince my company to investe in a program when the recommended OS is windows and there is already many freeware in windows doing exactly that. (ZOC is a good one)

reup

----------

## Proteus

@reup: Sorry, I thought you wanted to setup a server. My bad. Please accept my apology.

I fully understand that you want some sort of automatism for typing strings like that  :Smile: 

----------

## frostschutz

By the way, did you already check wether there was a client specifically made for cisco? A search for cisco on freshmeat turns up quite a lot of results.

----------

## magic919

I know we are a mile off the original topic with all this Cisco stuff, but I'd say have a look at Expect as a great tool.  We use it to write custom scripts to log onto a Cisco, change to enable mode, run set commands etc.  Great for repetitive stuff.

----------

## kashani

Take a look at http://www.shrubbery.net/rancid/ which is an entire package of Cisco admin script goodness. It is a bit daunting to get up and running.

kashani

----------

## reup

I did not know that their was so many people interested in cisco product. 

anyway, I manage NAS/SAN systems, they run at cisco but do not use the same cisco OS as a router or a switch. 

and I have tones of scripts, but at the end, when you parse a messages file, or when you run a command that is interactif, you need telnet. 

an exemple would be the migration of 50 systems to Active Directory, this is something that required 5 commands (not more) but you have to type them 50 times, in one evening, very tiedous. and creator of RSI. at the end, my arms are sore of the typing. I would prefert a click per options.

anyway, thanks all of you, I beleive I have to find a X terminal with configurable toolbar, not specialy a telnet client

(I have been browsing the net for few month already) this is the last tools I need to be able to erase M$ from my stations at work. needless to said that Linux is not supported by the Techs, luckily their is forums !

----------

## kadeux

@reup: 

Instead of searching for a toolbar, you can write the needed commands once in a text file one per line, open this file read-only with your texteditor, resize the editor window to the size of a sidebar, mark the line you just need with the mouse and paste the command (or the answer to a response) with the middle key of your mouse into the putty window with your current telnet session. (It's not as elegant as a toolbar, but works for me.)

----------

