Solved

networking in unix

Posted on 2000-05-17
7
244 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one 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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Let’s list some of the technologies that enable smooth teleworking. 
I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

710 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