Solved

networking in unix

Posted on 2000-05-17
7
242 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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

685 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