Sie sind auf Seite 1von 26

Client-Server Architecture

- Telnet , SSH
- FTP, SFTP
- SMTP
352362 - Network Operating Systems and
Protocols

Choopan Rattanapoka

 
• 
     
 2

  
– Client/Server Architecture
– Peer to Peer (P2P) Architecture
• 
   Client/Server Architecture
!"
 #
$%&
  2
 '(
– Client  

– Server  

Client-Server Architecture
•  
     Client
–  
   Server   





 Server  
 


•  
     Server


 

 Client
–    Client  

 Server 
   

 
Client  
 


• 
 Client/Server 
Client  
 
  
 Server  
Client ! 
    
  
 Client " !#
Client-Server Architecture
Servers

Clients
Client-Server Architecture
• 
– 
  Client   Server     ! "
 upgrade #$  , $$ %& '  (  Server  
)*+ $,+$ !-  Client
–   .( (  . Server !/)* Server
'  (!/-* $)0!  (1!/ +)
–  )   *' 
#$   
-  
– Server '  (!/-* $)0! 
 +) 
Client-Server Architecture
•  
– !

"#$ %
 # Server &' (
–   Server )( "    #*#
%
$+ & 
,"#+

•     Client-Server


– 
 

& $-
%
$
.
– Server : web server , mail server, ftp server, .., etc.
– Client : web browser, mail client, ftp client, ..,etc.
Telnet (Telecommunication network)
 

 PC  $ % &' $() * (
 &+ * (
 
) Dumb terminal   + 
 Server # ',+
+"  $( $*
+!% Server #  + -.+ Server ,%
+
/    )&',+ +&$0*
 % terminal
# !  
   )&',+ 
/  terminal 
  '  $ % )1'' ')   

  )& 
. 
 !,+ Server
/ + 
 + 
.+2 + telnet -.+%  PC  + 
 Server
Telnet
Telnet
• )* $%& Telnet " (+ $
– -  Client '( $ )* TCP !-  Server 
port   23
– ' $ ASCII code

•  Windows , Linux -+* telnet %. ,%& ,


 -)%#$%, $%&+*
telnet < telnet server>

telnet    prompt
Telnet
• 
""/ 0 Telnet (" # 
1$%0 ,%& *"
% .,(-*2#  -% (+%2.%/ / 
 $% .,(-*2 ,  2#$%

• Telnet  "+,(+ TCP #$% $


 , port   + debug application * (-*
,
,-*% .,
 text , )% TCP )
– telnet mail.kmutnb.ac.th 25 -  server :
mail.kmutnb.ac.th  port   25 )* TCP
Secure Shell (SSH)
• 
 Application (-*

/(+ Telnet $0*
 &
,$'%#

• SSH (+ TCP (-* port  , 22


• SSH )%%(-*)* public-key cryptography
• (+ ssh  , *"
 #
$%& 2 keys
– Public key  key ' 5 %
– Private key  key '*!*
– ' - M = privatekey( publickey( M ))
  SSH
• )*  SSH *(! 2 *(-*)* " (+
,
,-* public key

-  A -  B

A’s Private key B’s Private key

A’s Public key B’s Public key

B’s Public key A’s Public key


  SSH
•  * A " % ., M % B
– A  public key (Pb)  B   !'
– 61-* /() !'#)  private key (Pv)  B  !/
-  A -  B

' M
Pv(Pb(M)) = M
Pb(M)
B’s Public key B’s Private key
Exercise 1
1) 
 
 TCP  port 
 23 (telnet service)


 telnet !"#! 202.44.36.14 $  %
login : ect
password : mypass




 Telnet & '&%

 Telnet (% )

2) 
# 1 +%, wireshark  
 TCP ! port

 22 (ssh service)
$ ssh (putty.exe) -#!+%
server ,
login/password  .&



 ssh &%
 ) #%
File Transfer Protocol (FTP)
• 2 (
 %,%  download/upload !3* %)+' +
Server  Client
• FTP 2 (
 '+--$  port 
 % (
 2
port
– Port 
 &'
%"& # (port 21 /ftp)
– Port &# &'/,$   (port 20 /ftp-data)
•  Windows  Linux  FTP client %!# #
 $( $*
',+
ftp <    FTP server>  
ftp  ! "  #$ prompt
   FTP

( FTP server $7)' 5 % download +8&+)  !*


Login - ftp  password $,+ .+)  )* @

  FTP
•   FTP prompt (ftp>)   $( $* help $#',+
+"  FTP server %

•  FTP server  ', ++" %!#+


  ', +
$5% 


• 1   FTP client 2 GUI 


+ web browser
(IE, firefox) ,%   (
 FTP !# +#)
 ! 
,2+,',+  +' +
 ,+    text terminal
,%,2+ FTP  text mode

  FTP

•open  
   FTP server  open  
ftp server
•ascii     ascii
•binary     binary
•get  ! " download  !#
•put  ! " upload  !# server
•ls, dir " !$% server
•hash &
 
'  # ()$% 
•cd "% directory $%$*

FTP VS SFTP

 ,++ FTP % 
 telnet '!  
  %  ,%
  
#
 password 6(#
 FTP server !#

• #+
 +)%7
    SFTP
(secure FTP) -.+ % +" #)
  public/private
key %  SSH


  FTP $   0 6 (! +

login/password )))
/ + 
   + $ %
Exercise 2
• %,)%0 ftp )* #
 ftp server  NECTEC
)* ftp.nectec.or.th

• %, download #3,4(-*)* Garuda.tar.gz


– - '! hash +- '! hash

• #3,4-!" %2%( directory pub  NECTEC 


fonts
SMTP (Simple Maill Transfer Protocol)
• 
0 mail 
• %0  TCP (-* port  , 25
• -+*..
ascii
•  )% telnet )* %(-* port  , 25 *
mail #$%
– telnet < mail server> 25
 mail  SMTP
• 0* %$%&)%+* HELO  EHLO ,%&  version 
SMTP server  $%&)* host (-"*  mail ,
– HELO www.microsoft.com

• )*2.%$%&+* MAIL FROM:<email >


– MAIL FROM:<billgates@microsoft.com>

• )*2.%$%&+* RCPT TO:<email  >


– RCPT TO:<stevejobs@apple.com>
 mail  SMTP
• 0 4 DATA ,%& enter *&#
" 
!
email

•  *- email -% ,%&% enter 1 (-*%($& ,%&


0 4 "/$ (.) (-*,  &  ,%&$ enter

• "! 0 4 QUIT *


1$)*  mail server
  SMTP
Fakemail, mailbomb
•  

 (# (
 SMTP   , mail  % 
 
) fakemail #
   email &+ 
" -.+  +
) MAIL FROM:<
email >
• Mailbomb '
  
)%  (

 SMTP
$+ fakemail 2,) 

•    SMTP server  


 8+
') #9 !)'

+%&++,
 authentication
+ email  


server
• 1   ) '%& + fakemail !##+
 %    
Exercise 3
• %)*  SMTP server  mail.kmutnb.ac.th
• %
, email 2.% (-*%
• Email 2.%%789(-*. @kmutnb.ac.th
# )! SMTP " #  %2
• Subject  mail %& Hello fakemail
• ! email %789

Das könnte Ihnen auch gefallen