SlideShare uma empresa Scribd logo
1 de 48
Baixar para ler offline
Lecture 7:
File Transfer and
Remote File Access
BITS 2513
INTERNET TECHNOLOGY


                      1
Using FTP to Transfer Files
   Web servers (using HTTP) and e-mail software
    (using SMTP) must encode data so it appears
    as text when it travels over the Internet.
   FTP (File Transfer Protocol) offers an
    alternative.
   An FTP site is a computer running an FTP
    server application.
   On FTP server a program called daemon allows
    to download and upload files

                                                   2
Using FTP to Transfer Files (cont.)

   FTP can transfer binary files over the Internet
    without the encoding and decoding overhead,
    making it a popular protocol for moving files over
    the Internet.
   FTP also use to upload files from your computer
    to another computer on the internet




                                                     3
Using FTP to Transfer Files
(cont.)
   Large organizations might maintain several FTP sites in
    different parts of the world to speed up download time
    across the globe.
   These are called mirror sites.
   A mirror site is a server that contains the same set of
    files as a heavily used server to off-load some of the
    burden of providing the files to the community using
    them.
   Mirror sites also serve as a backup for the main server in
    case the main server fails.


                                                             4
How FTP Works
   An FTP server identifies users on an FTP site by their
    user IDs.
   FTP client and server software create a session after
    you are logged on.
   The FTP client has access to the file system on the
    server.
   The local computer (the client) issues character-like
    commands, and the remote computer (the server) replies
    with numbers that are interpreted by the local computer.


                                                           5
How FTP Works (cont.)
   FTP client and server software can access their
    individual file system and transfer files in either
    direction
    Local host                                Remote host

       File      FTP
                                      FTP          File
      System     Client
                                     Server       System




                                                           6
How FTP Works (cont.)
   FTP server usually listen at port 21 for client
    activity
   Most Web servers have FTP service running to
    receive changes to Web pages files from web
    developers
   FTP server normally run on the same computer
    that is running a Web server



                                                      7
Requirements for using FTP
   An FTP client installed on the computer.
   Login details of the FTP server to which you want to
    connect:
       The FTP server address. This looks a lot like the address you
        type in Internet Explorer to browse websites. One such example
        is “ftp://ftmk.kutkm.edu.my”.

       The user name and password required for the FTP connection.
        Some FTP servers let you connect to them anonymously. For
        anonymous connections, you do not need a user name and
        password.



                                                                         8
FTP Via a Web Browser
   Have you ever attempted to download software
    from a Web site and clicked a hyperlink that
    says “Click here to download now” or a similar
    message?


   If you carefully note the URL after you click to
    download the software, you will see that the
    protocol changes from http:// to ftp:// in the Web
    browser’s Address box.
                                                         9
How to use FTP
   Logging on to an FTP site with a Web browser




                                                   10
How to use FTP
      When you log on to an FTP site, you can browse through the
       available files by changing directories, seeing listing of all files and
       etc.




Using Windows
Explorer to
access FTP site
                                                                                  11
How to use FTP
   An error occur when you attempt to upload a file to an
    FTP site where you don’t have write permission




                                                             12
FTP from a Command Prompt
   Most operating systems, including Windows 9x,
    Windows NT, Windows 2000, and Windows XP,
    offer FTP client software that runs from a
    command prompt.

   A batch file is a file with a .bat file extension that
    contains a list of DOS-like commands that can
    be executed as a group.
                                                        13
FTP from a Command Prompt
cont.)
   Another protocol similar to FTP is TFTP (Trivial
    FTP).

   TFTP has fewer commands than FTP and can
    be used only to send and receive files.

   It can be used for multicasting in which a file is
    sent to more than one client at the same time
    using the UDP (User Datagram Protocol).
                                                         14
FTP session using
Windows XP FTP
utility




                    15
FTP Commands
Opening and closing connection
 ftp - starts an FTP session
 open hostname - connects to the specified host
 close - closes the connection (but not the FTP session!)
 quit - terminates the FTP session


Browsing on a remote machine
 dir - gives a full directory listing on the remote machine
 dir test* - displays only files and directories whose name begins with
   "test..."
 ls - same as dir, but provides a simplified listing of filenames


Directories in FTP
 pwd - prints the name of the current remote directory
 cd remote-directory - changes working directory on remote host
 cd .. - moves up one level in the directory structure on the remote host
 lcd directory - changes the default directory on local host

                                                                             16
Trivial File Transfer Protocol:
TFTP Usage and Design
   Transfer files between processes.
   Minimal overhead (no security).
   Designed for UDP, although could be used with
    many transport protocols.
   Easy to implement
   Small - possible to include in firmware
   Used to bootstrap workstations and network
    devices.

                                                    17
Diskless Workstation Booting 1
The call for help
                   Help! I don't know who I am!
                   My Ethernet address is:
                   4C:23:17:77:A6:03



                                   RARP

      Diskless
     Workstation




                                                  18
The answer from the all-knowing


   I know all! You are to be know as:
                                         RARP
   128.113.45.211
                                         Server




       Diskless
      Workstation
                            RARP REPLY




                                                  19
The request for instructions

                   I need the file named
                    boot-128.113.45.211




      Diskless
     Workstation
                    TFTP Request (Broadcast)




                                               20
The dialog

              here is part 1
                                                TFTP
                    I got part 1                Server


                       here is part 2

      Diskless
     Workstation

       boot file
                           TFTP File Transfer




                                                         21
TFTP Protocol
      5 message types:
         Read  request
         Write request
         Data
         ACK (acknowledgment)
         Error




                                 22
Messages
   Each is an independent UDP Datagram

   Each has a 2 byte opcode (1st 2 bytes)

   The structure of the rest of the datagram
    depends on the opcode.



                                                23
Message Formats
 OPCODE      FILENAME   0      MODE     0




 OPCODE    BLOCK#           DATA



 OPCODE    BLOCK#




 OPCODE    BLOCK#       ERROR MESSAGE   0



 2 bytes   2 bytes
                                            24
Read Request
      01                filename            0            mode                  0



             null terminated ascii string       null terminated ascii string
             containing name of file            containing transfer mode



2 byte opcode
network byte order



                                     variable length fields!
                                                                               25
Write Request
      02                filename            0            mode                  0



             null terminated ascii string       null terminated ascii string
             containing name of file            containing transfer mode



2 byte opcode
network byte order



                                     variable length fields!
                                                                               26
TFTP Data Packet
         03          block #                  data 0 to 512 bytes




                2 byte block number
                network byte order

2 byte opcode                         all data packets have 512 bytes
network byte order                    except the last one.




                                                                        27
TFTP Acknowledgment

                     04      block #




                          2 byte block number
2 byte opcode
                          network byte order
network byte order




                                                28
TFTP Error Packet
         05          errcode                   errstring                  0



                                     null terminated ascii error string
2 byte opcode
network byte order


                2 byte error code
                network byte order




                                                                              29
TFTP transfer modes
   “netascii” : for transferring text files.
     alllines end with rn (CR,LF).
     provides standard format for transferring text files.
     both ends responsible for converting to/from
      netascii format.
   “octet” : for transferring binary files.
     no    translation done.




                                                              30
NetAscii Transfer Mode
         Unix - end of line marker is just 'n'

   receiving a file
       you need to remove 'r' before storing data.
   sending a file
     you  need to replace every 'n' with "rn" before
        sending




                                                           31
TELNET



         32
Initiating and Using Telnet
Sessions
   Telnet enable user to;

     create   a remote command console session on a host.

     run command line programs, shell commands, and
      scripts in a remote command console session just as
      though you were locally logged on to the host and
      using a local command prompt window.



                                                         33
Telnet
   Telnet is a protocol used to pass commands
    and replies between the client the UNIX
    computer.

   All UNIX systems support some form of Telnet.

   Windows versions also include Telnet Client and
    Telnet Server components.


                                                    34
How Telnet Works
   To use Telnet you need to know IP address of
    the host where the resource you want to use
   When you contact the host, the distant computer
    and your computer negotiate how to
    communicate with each other
   When client and server communicate they use
    Telnet protocol



                                                  35
How Telnet Works
   You can start the service manually every time
    you want to connect to a host,
   Or you can configure the service so that it starts
    every time your computer starts.
   Telnet clients cannot connect to a host unless a
    Telnet server program (or service) is running
    and listening for connection requests.



                                                     36
How Telnet Works
   When run a Telnet client, it makes a connection request
    to the host (Telnet server).
   If a Telnet server responds to the request, the Telnet
    client and server negotiate the details of the connection,
    such as flow control settings, window size, and terminal
    type.
   After the connection details are successfully negotiated,
    and logon credentials are validated, the Telnet server
    program creates a Telnet command console session.



                                                             37
Telnet in Windows XP
   Use Run dialog box,
     type   telnet mydomain.com


   Use web browser
     Enter   telnet://mydomain.com in the address box




                                                         38
Telnet in DOS prompt




                       39
Telnet in HyperTerminal




                          40
Examples of TELNET client/server

   Tlntsvr.exe (Telnet Server) - preinstalled in
    Windows OS
   Telnet.exe (Telnet Server) – preinstalled in
    Windows OS




                                                    41
Telnet Commands
   open - to open hostname port number to
    establish a Telnet connection to a host.
   close - to close an existing Telnet connection
   quit - to exit from Telnet
   status - to determine whether the Telnet client is
    connected.




                                                    42
Telnet Limitations
   Telnet is a character-based communication
    protocol and not designed to transmit cursor
    movements or GUI information.
   Can only run command line programs, shell
    commands, scripts, and batch files
   Some editing programs, such as vi and Edit, can
    be run over a Telnet connection
   However, these interactive programs are not
    true GUI programs because cursor movement is
    controlled by the keyboard, not the mouse.
                                                  43
Telnet Limitations (cont.)
   By default, Telnet does not encrypt any data
    sent over the connection (including passwords),
    and so it is trivial to eavesdrop on the
    communications and use the password later for
    malicious purposes.
   Lacks an authentication scheme that makes it
    possible to ensure that communication is carried
    out between the two desired hosts


                                                   44
Using Secure Shell (SSH) Protocol

   SSH enables two computer to negotiate and
    establish secure connection that use encryption
   May stop cracker who try to sniff password and
    data
   Provide secure communication for doing email,
    accessing Web, login to remote site and
    publishing file in FTP (SFTP)



                                                  45
Using SSH Protocol (cont.)
   It uses public-key cryptography to authenticate the
    remote computer and to allow the remote computer to
    authenticate the user
   SSH provides confidentiality and integrity of data
    exchanged between the two computers using
       encryption
       message authentication codes (MACs).
   PuTTY is a free SSH client and multiplatform - establish
    a secure channel between a local and a remote
    computer


                                                           46
Summary
   FTP sites can be accessed by client software,
    such as Web browsers, operating system
    command utilities, or GUI software dedicated to
    FTP, such as WS_FTP Pro.
   FTP also can be accessed from a command
    prompt.




                                                      47
Summary (cont.)
   Telnet program runs on the computer and
    connects PC to a server on the network.
   Enter commands through the Telnet program
    and they will be executed as if you were entering
    them directly on the server console.
   Enables you to control the server and
    communicate with other servers on the network



                                                   48

Mais conteúdo relacionado

Mais procurados (20)

Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udp
 
Rarp
RarpRarp
Rarp
 
Wireless transmission
Wireless transmissionWireless transmission
Wireless transmission
 
5. icmp
5. icmp5. icmp
5. icmp
 
Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networks
 
Cs8591 u4
Cs8591 u4Cs8591 u4
Cs8591 u4
 
IEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and ServicesIEEE 802.11 Architecture and Services
IEEE 802.11 Architecture and Services
 
IP addressing seminar ppt
IP addressing seminar pptIP addressing seminar ppt
IP addressing seminar ppt
 
Computer Networks Unit 1 Introduction and Physical Layer
Computer Networks Unit 1 Introduction and Physical Layer Computer Networks Unit 1 Introduction and Physical Layer
Computer Networks Unit 1 Introduction and Physical Layer
 
TCP Vs UDP
TCP Vs UDP TCP Vs UDP
TCP Vs UDP
 
Transport protocols
Transport protocolsTransport protocols
Transport protocols
 
introduction about TCP/IP
introduction about TCP/IPintroduction about TCP/IP
introduction about TCP/IP
 
Routing Information Protocol (RIP)
Routing Information Protocol(RIP)Routing Information Protocol(RIP)
Routing Information Protocol (RIP)
 
Data link control & protocol concepts
Data link control & protocol conceptsData link control & protocol concepts
Data link control & protocol concepts
 
Leaky bucket algorithm
Leaky bucket algorithmLeaky bucket algorithm
Leaky bucket algorithm
 
TCP/IP Presentation
TCP/IP PresentationTCP/IP Presentation
TCP/IP Presentation
 
Routing protocols
Routing protocolsRouting protocols
Routing protocols
 
HDLC
HDLCHDLC
HDLC
 
IPV4 Frame Format
IPV4 Frame FormatIPV4 Frame Format
IPV4 Frame Format
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 

Destaque

Manejo de filezilla
Manejo de filezillaManejo de filezilla
Manejo de filezillaerwin0930
 
Het ABC van social networking
Het ABC van social networkingHet ABC van social networking
Het ABC van social networkingJan Krans
 
3 public key cryptography
3 public key cryptography3 public key cryptography
3 public key cryptographyRutvik Mehta
 
FTP Client and Server | Computer Science
FTP Client and Server | Computer ScienceFTP Client and Server | Computer Science
FTP Client and Server | Computer ScienceTransweb Global Inc
 
Team 5 presentation
Team 5 presentationTeam 5 presentation
Team 5 presentationrob420
 
An introduction to SSH
An introduction to SSHAn introduction to SSH
An introduction to SSHnussbauml
 
Protocolos; SNMP, TELNET, SSH
Protocolos; SNMP, TELNET, SSHProtocolos; SNMP, TELNET, SSH
Protocolos; SNMP, TELNET, SSHPetterson Castro
 
Oracle database - Get external data via HTTP, FTP and Web Services
Oracle database - Get external data via HTTP, FTP and Web ServicesOracle database - Get external data via HTTP, FTP and Web Services
Oracle database - Get external data via HTTP, FTP and Web ServicesKim Berg Hansen
 
Important tips on Router and SMTP mail routing
Important tips on Router and SMTP mail routingImportant tips on Router and SMTP mail routing
Important tips on Router and SMTP mail routingjayeshpar2006
 

Destaque (20)

An overview of ftp
An overview of ftpAn overview of ftp
An overview of ftp
 
Telnet & SSH
Telnet & SSHTelnet & SSH
Telnet & SSH
 
TELNET Protocol
TELNET ProtocolTELNET Protocol
TELNET Protocol
 
Dns ppt
Dns pptDns ppt
Dns ppt
 
Manejo de filezilla
Manejo de filezillaManejo de filezilla
Manejo de filezilla
 
Ftp server
Ftp serverFtp server
Ftp server
 
Het ABC van social networking
Het ABC van social networkingHet ABC van social networking
Het ABC van social networking
 
Psdn and ccitt x series
Psdn and ccitt x seriesPsdn and ccitt x series
Psdn and ccitt x series
 
Telnet
TelnetTelnet
Telnet
 
Telnet
TelnetTelnet
Telnet
 
3 public key cryptography
3 public key cryptography3 public key cryptography
3 public key cryptography
 
FTP Client and Server | Computer Science
FTP Client and Server | Computer ScienceFTP Client and Server | Computer Science
FTP Client and Server | Computer Science
 
Ch22
Ch22Ch22
Ch22
 
Team 5 presentation
Team 5 presentationTeam 5 presentation
Team 5 presentation
 
An introduction to SSH
An introduction to SSHAn introduction to SSH
An introduction to SSH
 
Protocolos; SNMP, TELNET, SSH
Protocolos; SNMP, TELNET, SSHProtocolos; SNMP, TELNET, SSH
Protocolos; SNMP, TELNET, SSH
 
Ch11
Ch11Ch11
Ch11
 
Oracle database - Get external data via HTTP, FTP and Web Services
Oracle database - Get external data via HTTP, FTP and Web ServicesOracle database - Get external data via HTTP, FTP and Web Services
Oracle database - Get external data via HTTP, FTP and Web Services
 
TCP/IP and DNS
TCP/IP and DNSTCP/IP and DNS
TCP/IP and DNS
 
Important tips on Router and SMTP mail routing
Important tips on Router and SMTP mail routingImportant tips on Router and SMTP mail routing
Important tips on Router and SMTP mail routing
 

Semelhante a Lecture 7 -_ftp,_tftp,_telnet_and_ssh

file transfer and access utilities
file transfer and access utilitiesfile transfer and access utilities
file transfer and access utilitiestumetr1
 
Using an FTP client - Client server computing
Using an FTP client -  Client server computingUsing an FTP client -  Client server computing
Using an FTP client - Client server computinglordmwesh
 
Telnet and FTP.ppt
Telnet and FTP.pptTelnet and FTP.ppt
Telnet and FTP.pptssuser1774d3
 
File tranfer protocol
File tranfer protocolFile tranfer protocol
File tranfer protocolKunalThorat9
 
香港六合彩
香港六合彩香港六合彩
香港六合彩csukxnr
 
六合彩 » SlideShare
六合彩 » SlideShare六合彩 » SlideShare
六合彩 » SlideSharemvtqyygx
 
六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideSharedqxjlhfc
 
香港六合彩-六合彩
香港六合彩-六合彩香港六合彩-六合彩
香港六合彩-六合彩qiohms
 
六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShareyqtvdsbl
 
六合彩-香港六合彩 » SlideShare
六合彩-香港六合彩 » SlideShare六合彩-香港六合彩 » SlideShare
六合彩-香港六合彩 » SlideSharemmfirkhw
 
香港六合彩 » SlideShare
香港六合彩 » SlideShare香港六合彩 » SlideShare
香港六合彩 » SlideSharecxrcpdu
 
六合彩-香港六合彩
六合彩-香港六合彩六合彩-香港六合彩
六合彩-香港六合彩skpkcd
 
Ftp: a slideshow on File transfer protocol
Ftp: a slideshow on File transfer protocol Ftp: a slideshow on File transfer protocol
Ftp: a slideshow on File transfer protocol Lina Guha Roy
 
Application layer
Application layerApplication layer
Application layerNeha Kurale
 
Application layer
Application layerApplication layer
Application layerNeha Kurale
 
application layer protocol for iot.pptx
application layer protocol for iot.pptxapplication layer protocol for iot.pptx
application layer protocol for iot.pptxaravind Guru
 

Semelhante a Lecture 7 -_ftp,_tftp,_telnet_and_ssh (20)

file transfer and access utilities
file transfer and access utilitiesfile transfer and access utilities
file transfer and access utilities
 
Ft pv2(1)
Ft pv2(1)Ft pv2(1)
Ft pv2(1)
 
Ftp.75 to 76
Ftp.75 to 76Ftp.75 to 76
Ftp.75 to 76
 
Using an FTP client - Client server computing
Using an FTP client -  Client server computingUsing an FTP client -  Client server computing
Using an FTP client - Client server computing
 
Telnet and FTP.ppt
Telnet and FTP.pptTelnet and FTP.ppt
Telnet and FTP.ppt
 
File tranfer protocol
File tranfer protocolFile tranfer protocol
File tranfer protocol
 
香港六合彩
香港六合彩香港六合彩
香港六合彩
 
六合彩 » SlideShare
六合彩 » SlideShare六合彩 » SlideShare
六合彩 » SlideShare
 
六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare
 
香港六合彩-六合彩
香港六合彩-六合彩香港六合彩-六合彩
香港六合彩-六合彩
 
六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare六合彩,香港六合彩 » SlideShare
六合彩,香港六合彩 » SlideShare
 
六合彩-香港六合彩 » SlideShare
六合彩-香港六合彩 » SlideShare六合彩-香港六合彩 » SlideShare
六合彩-香港六合彩 » SlideShare
 
香港六合彩 » SlideShare
香港六合彩 » SlideShare香港六合彩 » SlideShare
香港六合彩 » SlideShare
 
六合彩-香港六合彩
六合彩-香港六合彩六合彩-香港六合彩
六合彩-香港六合彩
 
FTP(In_Linux).pptx
FTP(In_Linux).pptxFTP(In_Linux).pptx
FTP(In_Linux).pptx
 
Ftp: a slideshow on File transfer protocol
Ftp: a slideshow on File transfer protocol Ftp: a slideshow on File transfer protocol
Ftp: a slideshow on File transfer protocol
 
Application layer
Application layerApplication layer
Application layer
 
Application layer
Application layerApplication layer
Application layer
 
application layer protocol for iot.pptx
application layer protocol for iot.pptxapplication layer protocol for iot.pptx
application layer protocol for iot.pptx
 
Application Layer
Application Layer Application Layer
Application Layer
 

Mais de Serious_SamSoul

Lecture 13 -_e-commmerce_e-banking_and_advanced_tech
Lecture 13 -_e-commmerce_e-banking_and_advanced_techLecture 13 -_e-commmerce_e-banking_and_advanced_tech
Lecture 13 -_e-commmerce_e-banking_and_advanced_techSerious_SamSoul
 
Lecture 12 -_internet_security
Lecture 12 -_internet_securityLecture 12 -_internet_security
Lecture 12 -_internet_securitySerious_SamSoul
 
Lecture 11 client_server_interaction
Lecture 11 client_server_interactionLecture 11 client_server_interaction
Lecture 11 client_server_interactionSerious_SamSoul
 
Lecture 9 electronic_mail_representation_and_transfer
Lecture 9 electronic_mail_representation_and_transferLecture 9 electronic_mail_representation_and_transfer
Lecture 9 electronic_mail_representation_and_transferSerious_SamSoul
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layerSerious_SamSoul
 
Lecture 5 internet-protocol_assignments
Lecture 5 internet-protocol_assignmentsLecture 5 internet-protocol_assignments
Lecture 5 internet-protocol_assignmentsSerious_SamSoul
 
Lecture 4 -_internet_infrastructure_2_updated_2011
Lecture 4 -_internet_infrastructure_2_updated_2011Lecture 4 -_internet_infrastructure_2_updated_2011
Lecture 4 -_internet_infrastructure_2_updated_2011Serious_SamSoul
 
Lecture 3 -_internet_infrastructure_updated_2011
Lecture 3 -_internet_infrastructure_updated_2011Lecture 3 -_internet_infrastructure_updated_2011
Lecture 3 -_internet_infrastructure_updated_2011Serious_SamSoul
 
Lecture 2 -_understanding_networks_with_presenter_notes
Lecture 2 -_understanding_networks_with_presenter_notesLecture 2 -_understanding_networks_with_presenter_notes
Lecture 2 -_understanding_networks_with_presenter_notesSerious_SamSoul
 
Lecture 1 -_overview_of_the_internet-1-
Lecture 1 -_overview_of_the_internet-1-Lecture 1 -_overview_of_the_internet-1-
Lecture 1 -_overview_of_the_internet-1-Serious_SamSoul
 
Lecture 1 -_overview_of_the_internet-1-
Lecture 1 -_overview_of_the_internet-1-Lecture 1 -_overview_of_the_internet-1-
Lecture 1 -_overview_of_the_internet-1-Serious_SamSoul
 

Mais de Serious_SamSoul (11)

Lecture 13 -_e-commmerce_e-banking_and_advanced_tech
Lecture 13 -_e-commmerce_e-banking_and_advanced_techLecture 13 -_e-commmerce_e-banking_and_advanced_tech
Lecture 13 -_e-commmerce_e-banking_and_advanced_tech
 
Lecture 12 -_internet_security
Lecture 12 -_internet_securityLecture 12 -_internet_security
Lecture 12 -_internet_security
 
Lecture 11 client_server_interaction
Lecture 11 client_server_interactionLecture 11 client_server_interaction
Lecture 11 client_server_interaction
 
Lecture 9 electronic_mail_representation_and_transfer
Lecture 9 electronic_mail_representation_and_transferLecture 9 electronic_mail_representation_and_transfer
Lecture 9 electronic_mail_representation_and_transfer
 
Lecture 6 -_presentation_layer
Lecture 6 -_presentation_layerLecture 6 -_presentation_layer
Lecture 6 -_presentation_layer
 
Lecture 5 internet-protocol_assignments
Lecture 5 internet-protocol_assignmentsLecture 5 internet-protocol_assignments
Lecture 5 internet-protocol_assignments
 
Lecture 4 -_internet_infrastructure_2_updated_2011
Lecture 4 -_internet_infrastructure_2_updated_2011Lecture 4 -_internet_infrastructure_2_updated_2011
Lecture 4 -_internet_infrastructure_2_updated_2011
 
Lecture 3 -_internet_infrastructure_updated_2011
Lecture 3 -_internet_infrastructure_updated_2011Lecture 3 -_internet_infrastructure_updated_2011
Lecture 3 -_internet_infrastructure_updated_2011
 
Lecture 2 -_understanding_networks_with_presenter_notes
Lecture 2 -_understanding_networks_with_presenter_notesLecture 2 -_understanding_networks_with_presenter_notes
Lecture 2 -_understanding_networks_with_presenter_notes
 
Lecture 1 -_overview_of_the_internet-1-
Lecture 1 -_overview_of_the_internet-1-Lecture 1 -_overview_of_the_internet-1-
Lecture 1 -_overview_of_the_internet-1-
 
Lecture 1 -_overview_of_the_internet-1-
Lecture 1 -_overview_of_the_internet-1-Lecture 1 -_overview_of_the_internet-1-
Lecture 1 -_overview_of_the_internet-1-
 

Último

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 

Último (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 

Lecture 7 -_ftp,_tftp,_telnet_and_ssh

  • 1. Lecture 7: File Transfer and Remote File Access BITS 2513 INTERNET TECHNOLOGY 1
  • 2. Using FTP to Transfer Files  Web servers (using HTTP) and e-mail software (using SMTP) must encode data so it appears as text when it travels over the Internet.  FTP (File Transfer Protocol) offers an alternative.  An FTP site is a computer running an FTP server application.  On FTP server a program called daemon allows to download and upload files 2
  • 3. Using FTP to Transfer Files (cont.)  FTP can transfer binary files over the Internet without the encoding and decoding overhead, making it a popular protocol for moving files over the Internet.  FTP also use to upload files from your computer to another computer on the internet 3
  • 4. Using FTP to Transfer Files (cont.)  Large organizations might maintain several FTP sites in different parts of the world to speed up download time across the globe.  These are called mirror sites.  A mirror site is a server that contains the same set of files as a heavily used server to off-load some of the burden of providing the files to the community using them.  Mirror sites also serve as a backup for the main server in case the main server fails. 4
  • 5. How FTP Works  An FTP server identifies users on an FTP site by their user IDs.  FTP client and server software create a session after you are logged on.  The FTP client has access to the file system on the server.  The local computer (the client) issues character-like commands, and the remote computer (the server) replies with numbers that are interpreted by the local computer. 5
  • 6. How FTP Works (cont.)  FTP client and server software can access their individual file system and transfer files in either direction Local host Remote host File FTP FTP File System Client Server System 6
  • 7. How FTP Works (cont.)  FTP server usually listen at port 21 for client activity  Most Web servers have FTP service running to receive changes to Web pages files from web developers  FTP server normally run on the same computer that is running a Web server 7
  • 8. Requirements for using FTP  An FTP client installed on the computer.  Login details of the FTP server to which you want to connect:  The FTP server address. This looks a lot like the address you type in Internet Explorer to browse websites. One such example is “ftp://ftmk.kutkm.edu.my”.  The user name and password required for the FTP connection. Some FTP servers let you connect to them anonymously. For anonymous connections, you do not need a user name and password. 8
  • 9. FTP Via a Web Browser  Have you ever attempted to download software from a Web site and clicked a hyperlink that says “Click here to download now” or a similar message?  If you carefully note the URL after you click to download the software, you will see that the protocol changes from http:// to ftp:// in the Web browser’s Address box. 9
  • 10. How to use FTP  Logging on to an FTP site with a Web browser 10
  • 11. How to use FTP  When you log on to an FTP site, you can browse through the available files by changing directories, seeing listing of all files and etc. Using Windows Explorer to access FTP site 11
  • 12. How to use FTP  An error occur when you attempt to upload a file to an FTP site where you don’t have write permission 12
  • 13. FTP from a Command Prompt  Most operating systems, including Windows 9x, Windows NT, Windows 2000, and Windows XP, offer FTP client software that runs from a command prompt.  A batch file is a file with a .bat file extension that contains a list of DOS-like commands that can be executed as a group. 13
  • 14. FTP from a Command Prompt cont.)  Another protocol similar to FTP is TFTP (Trivial FTP).  TFTP has fewer commands than FTP and can be used only to send and receive files.  It can be used for multicasting in which a file is sent to more than one client at the same time using the UDP (User Datagram Protocol). 14
  • 15. FTP session using Windows XP FTP utility 15
  • 16. FTP Commands Opening and closing connection  ftp - starts an FTP session  open hostname - connects to the specified host  close - closes the connection (but not the FTP session!)  quit - terminates the FTP session Browsing on a remote machine  dir - gives a full directory listing on the remote machine  dir test* - displays only files and directories whose name begins with "test..."  ls - same as dir, but provides a simplified listing of filenames Directories in FTP  pwd - prints the name of the current remote directory  cd remote-directory - changes working directory on remote host  cd .. - moves up one level in the directory structure on the remote host  lcd directory - changes the default directory on local host 16
  • 17. Trivial File Transfer Protocol: TFTP Usage and Design  Transfer files between processes.  Minimal overhead (no security).  Designed for UDP, although could be used with many transport protocols.  Easy to implement  Small - possible to include in firmware  Used to bootstrap workstations and network devices. 17
  • 18. Diskless Workstation Booting 1 The call for help Help! I don't know who I am! My Ethernet address is: 4C:23:17:77:A6:03 RARP Diskless Workstation 18
  • 19. The answer from the all-knowing I know all! You are to be know as: RARP 128.113.45.211 Server Diskless Workstation RARP REPLY 19
  • 20. The request for instructions I need the file named boot-128.113.45.211 Diskless Workstation TFTP Request (Broadcast) 20
  • 21. The dialog here is part 1 TFTP I got part 1 Server here is part 2 Diskless Workstation boot file TFTP File Transfer 21
  • 22. TFTP Protocol 5 message types:  Read request  Write request  Data  ACK (acknowledgment)  Error 22
  • 23. Messages  Each is an independent UDP Datagram  Each has a 2 byte opcode (1st 2 bytes)  The structure of the rest of the datagram depends on the opcode. 23
  • 24. Message Formats OPCODE FILENAME 0 MODE 0 OPCODE BLOCK# DATA OPCODE BLOCK# OPCODE BLOCK# ERROR MESSAGE 0 2 bytes 2 bytes 24
  • 25. Read Request 01 filename 0 mode 0 null terminated ascii string null terminated ascii string containing name of file containing transfer mode 2 byte opcode network byte order variable length fields! 25
  • 26. Write Request 02 filename 0 mode 0 null terminated ascii string null terminated ascii string containing name of file containing transfer mode 2 byte opcode network byte order variable length fields! 26
  • 27. TFTP Data Packet 03 block # data 0 to 512 bytes 2 byte block number network byte order 2 byte opcode all data packets have 512 bytes network byte order except the last one. 27
  • 28. TFTP Acknowledgment 04 block # 2 byte block number 2 byte opcode network byte order network byte order 28
  • 29. TFTP Error Packet 05 errcode errstring 0 null terminated ascii error string 2 byte opcode network byte order 2 byte error code network byte order 29
  • 30. TFTP transfer modes  “netascii” : for transferring text files.  alllines end with rn (CR,LF).  provides standard format for transferring text files.  both ends responsible for converting to/from netascii format.  “octet” : for transferring binary files.  no translation done. 30
  • 31. NetAscii Transfer Mode Unix - end of line marker is just 'n'  receiving a file  you need to remove 'r' before storing data.  sending a file  you need to replace every 'n' with "rn" before sending 31
  • 32. TELNET 32
  • 33. Initiating and Using Telnet Sessions  Telnet enable user to;  create a remote command console session on a host.  run command line programs, shell commands, and scripts in a remote command console session just as though you were locally logged on to the host and using a local command prompt window. 33
  • 34. Telnet  Telnet is a protocol used to pass commands and replies between the client the UNIX computer.  All UNIX systems support some form of Telnet.  Windows versions also include Telnet Client and Telnet Server components. 34
  • 35. How Telnet Works  To use Telnet you need to know IP address of the host where the resource you want to use  When you contact the host, the distant computer and your computer negotiate how to communicate with each other  When client and server communicate they use Telnet protocol 35
  • 36. How Telnet Works  You can start the service manually every time you want to connect to a host,  Or you can configure the service so that it starts every time your computer starts.  Telnet clients cannot connect to a host unless a Telnet server program (or service) is running and listening for connection requests. 36
  • 37. How Telnet Works  When run a Telnet client, it makes a connection request to the host (Telnet server).  If a Telnet server responds to the request, the Telnet client and server negotiate the details of the connection, such as flow control settings, window size, and terminal type.  After the connection details are successfully negotiated, and logon credentials are validated, the Telnet server program creates a Telnet command console session. 37
  • 38. Telnet in Windows XP  Use Run dialog box,  type telnet mydomain.com  Use web browser  Enter telnet://mydomain.com in the address box 38
  • 39. Telnet in DOS prompt 39
  • 41. Examples of TELNET client/server  Tlntsvr.exe (Telnet Server) - preinstalled in Windows OS  Telnet.exe (Telnet Server) – preinstalled in Windows OS 41
  • 42. Telnet Commands  open - to open hostname port number to establish a Telnet connection to a host.  close - to close an existing Telnet connection  quit - to exit from Telnet  status - to determine whether the Telnet client is connected. 42
  • 43. Telnet Limitations  Telnet is a character-based communication protocol and not designed to transmit cursor movements or GUI information.  Can only run command line programs, shell commands, scripts, and batch files  Some editing programs, such as vi and Edit, can be run over a Telnet connection  However, these interactive programs are not true GUI programs because cursor movement is controlled by the keyboard, not the mouse. 43
  • 44. Telnet Limitations (cont.)  By default, Telnet does not encrypt any data sent over the connection (including passwords), and so it is trivial to eavesdrop on the communications and use the password later for malicious purposes.  Lacks an authentication scheme that makes it possible to ensure that communication is carried out between the two desired hosts 44
  • 45. Using Secure Shell (SSH) Protocol  SSH enables two computer to negotiate and establish secure connection that use encryption  May stop cracker who try to sniff password and data  Provide secure communication for doing email, accessing Web, login to remote site and publishing file in FTP (SFTP) 45
  • 46. Using SSH Protocol (cont.)  It uses public-key cryptography to authenticate the remote computer and to allow the remote computer to authenticate the user  SSH provides confidentiality and integrity of data exchanged between the two computers using  encryption  message authentication codes (MACs).  PuTTY is a free SSH client and multiplatform - establish a secure channel between a local and a remote computer 46
  • 47. Summary  FTP sites can be accessed by client software, such as Web browsers, operating system command utilities, or GUI software dedicated to FTP, such as WS_FTP Pro.  FTP also can be accessed from a command prompt. 47
  • 48. Summary (cont.)  Telnet program runs on the computer and connects PC to a server on the network.  Enter commands through the Telnet program and they will be executed as if you were entering them directly on the server console.  Enables you to control the server and communicate with other servers on the network 48