Thursday, March 2, 2017

Configure ftp server on Redhat 7.3 in AWS ec2


Step  1 :    Install   software

[root@ip-172-31-31-134 ~]# yum  install  vsftpd  -y

Step  2 :  configure server   

Note:    It  is already configured  for donwloading and uploading

Step  3 :   create an user account  for your clinet  and start  the service

[root@ip-172-31-31-134 ~]# useradd   kenny
[root@ip-172-31-31-134 ~]# passwd   kenny
Changing password for user kenny.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.


Service  start  :

[root@ip-172-31-31-134 ~]# systemctl   start  vsftpd  
[root@ip-172-31-31-134 ~]# systemctl   status   vsftpd  

● vsftpd.service - Vsftpd ftp daemon
   Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Thu 2017-03-02 21:43:04 EST; 6s ago
  Process: 9417 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 9418 (vsftpd)
   CGroup: /system.slice/vsftpd.service
           └─9418 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf

Mar 02 21:43:04 ip-172-31-31-134.us-west-2.compute.internal systemd[1]: Start...
Mar 02 21:43:04 ip-172-31-31-134.us-west-2.compute.internal systemd[1]: Start...
Hint: Some lines were ellipsized, use -l to show in full.


Turn off  firewalld  and  selinux 

[root@ip-172-31-31-134 ~]# setenforce 0                 #  Selinux 
[root@ip-172-31-31-134 ~]# iptables  -F                    #  firewalld 



Now  connect  from  Linux  based  client  via  ftp command :


adhoc@adhoc:~/Desktop/Desktop$ ftp  35.166.60.13
Connected to 35.166.60.13.
220 (vsFTPd 3.0.2)
Name (35.166.60.13:adhoc): kenny
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> put result.php                                             #  uloading a file  from my computer to ftp server
local: result.php remote: result.php
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 Transfer complete.
ftp> 


Note:  if  you are a windows user then you can use  Filezilla



No comments:

Post a Comment