Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to get telnet access to your gentoo machine
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
lyonsd
Apprentice
Apprentice


Joined: 02 Mar 2005
Posts: 153
Location: Flowery Branch, GA

PostPosted: Wed Nov 16, 2005 8:58 pm    Post subject: How to get telnet access to your gentoo machine Reply with quote

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.

Code:

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...

Code:

# 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...

Code:
       only_from       = localhost


to

Code:
#       only_from       = localhost


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

Change this line...

Code:
        disable         = yes


to

Code:
        disable         = no



Now run

Code:
/etc/init.d/xinetd start

_________________
Dave
Back to top
View user's profile Send private message
rev138
l33t
l33t


Joined: 19 Jun 2003
Posts: 848
Location: Vermont, USA

PostPosted: Wed Nov 16, 2005 8:59 pm    Post subject: Reply with quote

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

-S
Back to top
View user's profile Send private message
lyonsd
Apprentice
Apprentice


Joined: 02 Mar 2005
Posts: 153
Location: Flowery Branch, GA

PostPosted: Wed Nov 16, 2005 9:22 pm    Post subject: Reply with quote

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.
_________________
Dave
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Wed Nov 16, 2005 9:26 pm    Post subject: Reply with quote

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

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
lyonsd
Apprentice
Apprentice


Joined: 02 Mar 2005
Posts: 153
Location: Flowery Branch, GA

PostPosted: Wed Nov 16, 2005 9:37 pm    Post subject: Reply with quote

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.
_________________
Dave
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Wed Nov 16, 2005 10:07 pm    Post subject: Reply with quote

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) :lol:
Back to top
View user's profile Send private message
lyonsd
Apprentice
Apprentice


Joined: 02 Mar 2005
Posts: 153
Location: Flowery Branch, GA

PostPosted: Thu Nov 17, 2005 1:31 pm    Post subject: Reply with quote

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.
_________________
Dave
Back to top
View user's profile Send private message
Cocker68
Apprentice
Apprentice


Joined: 16 Jan 2003
Posts: 227
Location: Germany

PostPosted: Thu Nov 17, 2005 2:19 pm    Post subject: Reply with quote

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

You can do things with telnet, which you cannot do with ssh.
E.g.
Code:
$ 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.
Code:
# 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
Code:
# grep -l telnet thread* | while read T; do echo "telnet is EVIL" >> "$T"; done
in the forums.

- Cocker :wq
Back to top
View user's profile Send private message
rev138
l33t
l33t


Joined: 19 Jun 2003
Posts: 848
Location: Vermont, USA

PostPosted: Thu Nov 17, 2005 2:22 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Fri Jan 06, 2006 11:42 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Fri Jan 06, 2006 12:24 pm    Post subject: Reply with quote

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).
_________________
Greetings,
Proteus
Back to top
View user's profile Send private message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Fri Jan 06, 2006 1:00 pm    Post subject: Reply with quote

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 :lol:

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

reup
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Fri Jan 06, 2006 1:39 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Fri Jan 06, 2006 1:49 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Fri Jan 06, 2006 1:59 pm    Post subject: Reply with quote

@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 :-)
_________________
Greetings,
Proteus
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Fri Jan 06, 2006 2:16 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Fri Jan 06, 2006 9:33 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Fri Jan 06, 2006 10:00 pm    Post subject: Reply with quote

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
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
reup
Guru
Guru


Joined: 13 May 2005
Posts: 419
Location: Nederland

PostPosted: Sat Jan 07, 2006 4:33 pm    Post subject: Reply with quote

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 !
Back to top
View user's profile Send private message
kadeux
Tux's lil' helper
Tux's lil' helper


Joined: 21 Nov 2005
Posts: 103

PostPosted: Sat Jan 07, 2006 6:29 pm    Post subject: Reply with quote

@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.)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum