Solved

networking in unix

Posted on 2000-05-17
7
247 Views
Last Modified: 2013-12-23
Through telnet connection, i want to login to a unix server and i want that it should always connect to the server with a particular ttyp terminal. It means that whenever i try to telnet from counter no 1 and get connected with the server, it should always connect as ttyp01 only. Likewise from ctr no 2, it should always connect as ttyp02 only. How to implement it in case of SCO unix 5.0.5 server. Please reply as soon as possible. Thanking you,

Regards
0
Comment
Question by:roy_bk100
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 21

Expert Comment

by:tfewster
ID: 2818580
telnetd allocates pseudo-ttys dynamically and will free them up for re-use when a client disconnects; You could try disabling this by specifying the -n option to telnetd in /etc/inetd.conf

If these are dumb terminals on a terminal server, you may be able to configure the termserver to keep the connection alive. It may even support rtelnet, which _does_ allow you to fix tty numbers by initiating the connection from the server.

Otherwise, if the server is rebooted, all connections will be lost and the ttys would be reallocated as users connected.

What is the requirement behind this question? It may be easier to set an environment variable dependent on the user ID if a user always logs on to a particular terminal, and send messages etc. to the device based on that variable.

0
 

Author Comment

by:roy_bk100
ID: 2824646
The requirement is exactly like as mentioned by you in the last para of the reply. A particular user ID should be able to connect only from a particular user and he should always be allocated the same tty. I think now i am clear in my question.
  waiting for your early reply,
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 2827547
What's the problem you're actually trying to solve?  Is it related to reattaching to an existing "session"?  If so, you'd should look at 'screen'.
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:roy_bk100
ID: 2828340
I want to know "Can a specific tty be allotted to a client as per the IP address of the client?". If yes, then how?
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 2833391
Yes, a specific tty can be allocated to a client as per the IP address of the client.  However, to do this you will have to hack telnetd (source available from the various Linux and BSD sites) to keep a table of the allocations and then try to assign the same tty as was used the last time.  This requires significant programming skills.
0
 

Author Comment

by:roy_bk100
ID: 2833965
It could not solve the pupose. Simply saying yes could not explain how.
0
 
LVL 14

Accepted Solution

by:
chris_calabrese earned 70 total points
ID: 2834450
I believe I have explained how.  You start with the source code to telnetd and hack it to keep a state file with the associations between client IP's and tty's and try to re-use the same ones.

Since they may already be in use, you have to decide what to do if you can't allocate the one you want (perhaps use a range for each client).

Also, unless you have an SCO source license, you'll first have to port one of the oepn source telnetd's.

I'm not saying this is easy.  In fact, I'm saying it's very difficult.  However, I am saying this is the easiest way to accomplish what you want and that it definitely will work.

"Sometimes when you fill a vacuum it still sucks."
  - Brian Kernighan on X Windows
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month6 days, 15 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question