ch 25-remote login (telnet,rlogin) xiaoying cheng yinghsuan huang chunli yu cheng zhang yi zhang
TRANSCRIPT
![Page 1: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/1.jpg)
CH 25-Remote Login CH 25-Remote Login (TELNET,Rlogin)(TELNET,Rlogin)
Xiaoying Cheng
Yinghsuan Huang
Chunli Yu
Cheng Zhang
Yi Zhang
![Page 2: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/2.jpg)
IntroductionIntroduction
Remote login:– Login to one host and then remote login across
the network to any other host
Telnet:– A standard application. It works between hosts
that use different operating systems.
![Page 3: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/3.jpg)
TELNET ProtocolTELNET Protocol
Allow a user to log into a computer across an internet.
– Establish a TCP connection.– Pass keystrokes from the user’s keyboard directly to
the remote computer.– Carry output from the remote machine back to the
user’s screen.
Transparent: user’s keyboard and display attach directly to the remote machine.
![Page 4: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/4.jpg)
TELNET Three ServicesTELNET Three Services
1 It defines a network virtual terminal that provides a standard interface to remote systems.
2 Telnet includes a mechanism that allows the client and server to negotiate options, and it provides a set of standard options.
3 Telnet treats both ends of the connection symmetrically.
Thus , telnet allows an arbitrary program to become a client, either end can negotiate options.
![Page 5: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/5.jpg)
TELNET Client – Server ModelTELNET Client – Server Model
Telnet client
Terminaldriver
TCP/IP
User at a terminal
TCP/IPPseudo-terminal
driver
Telnet server Login shell
TCP connection
![Page 6: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/6.jpg)
How application programs implement a How application programs implement a TELNET client and serverTELNET client and server
Operatingsystem
TCP/IPinternet
TELNETclient
User’s keyboard& display
Operatingsystem
TELNET server
Client sendsTo server
Server receivesFrom client
Server sends to pseudo terminal
Client reads From terminal
![Page 7: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/7.jpg)
Pseudo terminalPseudo terminal
Pseudo terminal describe the OS entry point that allows a running program like the TELNET server to transfer characters to the operating system as if they came from a keyboard.
Each slave server connects a TCP stream from one client to a particular pseudo terminal.
![Page 8: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/8.jpg)
Network Virtual Terminal (NVT)Network Virtual Terminal (NVT)
An imaginary device from which both ends of the connection, the client and the server, map their real terminal to and from.
User’s Keyboard& display
Client ServerServer’ssystem
Client system format NVT format Server system format
TCP connectionacross internet
![Page 9: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/9.jpg)
NVT FormatNVT Format
7 – bit USASCII:– Each 7 – bit character is sent as an 8-bit byte
with the high-order bit set to 0.An end-of-line is transmitted as 2-character
sequence CR followed by a LF. Such as \r\nA carriage return is transmitted as 2-
character sequence CR followed by a NUL (byte of 0). Such as \r\0
![Page 10: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/10.jpg)
Control FunctionsControl Functions
NVT as accepting input from a keyboard that can generate more than 128 possible characters. (Figure 25.4)
To pass control functions across TCP connection, TELNET encodes them using escape sequence – IAC to indicate the next byte is the command byte. (Figure 25.5)
![Page 11: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/11.jpg)
25.6 Forcing the Server to 25.6 Forcing the Server to Read a Control FunctionRead a Control Function
Method: TELNET uses out of band signal– Problem ? misbehaving application causes server’s
buffer to fill up, and block server
– Solution? Control function, SYNCH command and data mark causes TCP to send a segment with URGENT DATA bit set to bypass flow control and reach server immediately. Server then will discard all data until data mark and resume normal processing.
![Page 12: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/12.jpg)
25.7 TELNET options25.7 TELNET options
In TELNET , options are negotiable, the client and server can reconfigure their connection.– i.e. 7-bit or 8-bit data
The range of TELNET options is wide: some extend the capabilities in major ways while others deal minor details.– P. 493, list of Telnet option.
![Page 13: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/13.jpg)
25.8 TELNET Option Negotiation25.8 TELNET Option Negotiation
Symmetric: both of sides – Will X? Do/Don’t X.
Different version communication– If don’t understand request, decline!
![Page 14: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/14.jpg)
25.9 Rlogin (BSD UNIX)25.9 Rlogin (BSD UNIX)
Trusted Hosts– administrators may choose a set of
“trusted” machines which are shared and establish equivalences among user logins.
One user, different login names in different machines without password.
rsh– One variant rlogin. rsh diamond ls
![Page 15: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/15.jpg)
25.9 Rlogin (BSD UNIX) cont.25.9 Rlogin (BSD UNIX) cont.
Advantage– rlogin understand both local and remote
computing environments, they communicate better than TELNET.
Unix stdin, stdout. Re-direction exports user’s environment to remote
machine.
![Page 16: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/16.jpg)
DemoDemo
rlogin and rsh– Sun lab doesn’t fully support rsh.– Neither rlogin
Telnet: is not Telnet only– telnet different port/protocol– Knowledge of TCP/IP
Being a hacker?
![Page 17: CH 25-Remote Login (TELNET,Rlogin) Xiaoying Cheng Yinghsuan Huang Chunli Yu Cheng Zhang Yi Zhang](https://reader035.vdocuments.net/reader035/viewer/2022071716/56649f2f5503460f94c48c12/html5/thumbnails/17.jpg)