{"id":472,"date":"2020-08-18T19:23:47","date_gmt":"2020-08-18T20:23:47","guid":{"rendered":"http:\/\/www.linux-tutorial.info\/?page_id=77"},"modified":"2020-08-22T19:26:18","modified_gmt":"2020-08-22T20:26:18","slug":"this-is-the-page-title-toplevel-305","status":"publish","type":"page","link":"http:\/\/www.linux-tutorial.info\/?page_id=472","title":{"rendered":"Pseudo Terminals"},"content":{"rendered":"\n<title>Pseudo-Terminals<\/title>\n<p>\nThe telnetd <glossary>daemon<\/glossary>\nis a server which supports the telnet program. Makes sense huh? Telnet is a\n<glossary>terminal<\/glossary> program that allows you to work interactively with\nremote machines, just as if you would with the local machine. When inetd\nreceives a incoming telnet request, it invokes telnetd.\n<\/p>\n<p>\nWhat you then see is no different that if you had logged in locally to that\nmachine (probably). You are presented with a login: prompt, you enter you\n<glossary>logname<\/glossary> and password. If these are correct, you then are\ngiven a <glossary>shell<\/glossary> that you can enter commands starts\napplications, etc.\n<\/p>\n<p>\nThe way telnetd works is that it allocates a <glossary>pseudo-terminal<\/glossary>\ndevice for you.\nThis <glossary>pseudo-terminal<\/glossary>\nhas the same behavior as a &#8220;normal&#8221; <glossary>terminal<\/glossary>\nin that you\ninput commands and see the results on your screen. Internal the pseudo-terminal\nis broken down into two parts. The master portion is the side that you see.\nSince your side is the one that is controlling things, your side is the master.\nThe master side accepts input from your telnet program and passes them to\ntelnetd on the remote side. As you might guess, the side that has to listen to\nthe master is the slave. The slave side of the <glossary>pseudo-terminal<\/glossary>\nserves as <glossary>stdin<\/glossary>,\nstdout, and <glossary>stderr<\/glossary>\nfor the remote <glossary>application<\/glossary>.\n <\/p>\n<map name=\"pseu_tty\">\n   <area shape=rect coords=\"0,0,87,87\" href=\"popup#local telnet#The local telnet process interacts with the user.\">\n   <area shape=rect coords=\"0,108,84,204\" href=\"popup#master pseudo tty#The local telnet process communicates with the master pseudo tty.\">\n   <area shape=rect coords=\"0,259,84,359\" href=\"popup#slave pseudo tty#The remote slave pseudo tty communicates with the remote process.\">\n   <area shape=rect coords=\"0,386,83,463\" href=\"popup#remote process#The remote process carries out actions on the remote machine.\">\n<\/map>\n<p>\n<img decoding=\"async\" src=\"pseu_tty.png\" width=113 height=464 border=0 usemap=\"#pseu_tty\">\n<p>\n<icaption>Pseudo-ttys<\/icaption>(interactive)<\/p>\n<p>\nSimilar in functionality to telnet is rlogin. The server for rlogin, is\nrlogind, and like telnetd, is started by inetd. One of the primary differences\nis that, if configured, rlogind can provided a connection without the normal\n<glossary>login<\/glossary> procedures.\n<\/p>\n<p>\nThe functionality of rlogind is very similar to that of telnetd.\nPseudo-terminals are allocated and the slave portion becomes the\n<glossary>stdin<\/glossary>, <glossary>stdout<\/glossary>,  and\n<glossary>stderr<\/glossary>. During <glossary>login<\/glossary>,\n rlogind uses an authentication procedure called &#8220;host equivalence&#8221;, which sets\nup remote machines as being &#8220;trusted&#8221;. If rlogind on the destination machine\nauthenticates the source machine, the user is automatically logged in. If the\nauthentication fails, the user must go through the normal login procedure. How\nto set up <glossary>host<\/glossary> equivalence, we&#8217;ll get to later.\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pseudo-Terminals The telnetd daemon is a server which supports the telnet program. Makes sense huh? Telnet is a terminal program that allows you to work interactively with remote machines, just as if you would with the local machine. When inetd &hellip; <a href=\"http:\/\/www.linux-tutorial.info\/?page_id=472\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-472","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=472"}],"version-history":[{"count":1,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/472\/revisions"}],"predecessor-version":[{"id":672,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/472\/revisions\/672"}],"wp:attachment":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}