Showing posts with label ssh. Show all posts
Showing posts with label ssh. Show all posts

Tuesday, 8 July 2014

FILE TRANSFER PROTOCOL- LINUX TERMINAL (Explanation With Diagrams)

FTP(File Transfer Protocol):

-> FTP is a client-server protocol.
-> FTP requires the client to enter plaintext password to access the server.
-> FTP uses SSH protocol for password verification and user authentication.
-> One system acts as client and other acts as server.
-> The server can regulate the access of its contents to several users.
-> FTP operates in two modes.
      *Active
      *Passive
-> In Active mode, two ports are used.
      Ex. If client connects to a port N, it can listen to the server response from port(N+1)
-> In Passive mode, only one port is used.

Default Location of FTP directory in Server Computer:
           
                  /srv/ftp

Default Location of FTP configuration settings:

                  /etc

and the file name is vsftpd.conf

STEP 1:

In the vsftpd.conf file,(figure :1)



figure :1

Edit the following basic things:(figure:2) --> Enable Anonymous (anonymous_enable=yes)
--> Enable Write-Enable (write_enable=yes)
--> To allow local users, Enable local users(local_users=yes)


figure :2

STEP 2:

Restart the FTP process by using the following Command
           
                  sudo service vsftpd restart

STEP 3: Enter into FTP by typing the following Command(figure:3)
      
                  ftp<hostname> or ftp<IP-Address of the server>

    


figure :3

STEP 4:
Enter user name and password.(figure :4)


(figure :4)

STEP 5:
After correct Authentication, use GET and PUT commands to move files from server to client and vice-versa.

GET:  Server--->Client
PUT:  Server<---Client

GET:(figure :5)
$get
(local-file)<path to the local file>
(remote-file)<path to the remote file>



(figure :5)

PUT:(figure :6)
$put
(local-file)<path to the local file>
(remote-file)<path to the remote file>

(figure :6)


Additional Information:
-> The server system can restrict the access of the client users within the root directories using chroot enable option within vsftpd.conf file.
                                                                                                                                             Author
Sandheep Kumar
Project Engineer