Step 10 » The below steps must be followed while creating Users for sftp access.Ĭreate user john with ftpaccess group and /usr/bin/nologin sudo useradd -m john -g ftpaccess -s sudo passwd johnChange ownership for the home sudo chown root /home/johnCreate a folder inside home directory for writing and change ownership of that sudo mkdir sudo chown john:ftpaccess /home/john/www Step 9 » Restart sshd sudo service ssh restart Subsystem sftp /usr/lib/openssh/sftp-server and replace withįorceCommand internal-sftp» and comment the below line ( Last line). Step 8 » Now make changes in this /etc/ssh/sshd_config file. Step 7 » Create a new group ftpaccess for FTP sudo groupadd ftpaccess so we need openssh-server package installed, Issue the below command if it’s not already sudo apt-get install openssh-server SFTP is called as “Secure FTP” which generally use SSH File Transfer Protocol. Please continue for SFTP configuration Secure FTP ( SFTP ) Please note using ftp on port 21 is a big security risk. Now try to connect this ftp server with the username on port 21 using winscp or filezilla client and make sure that user cannot access the other folders outside the home directory. Open /etc/shells and add the following line at the end. Step 6 » Allow login access for nologin shell. Create user with the below command.Use /usr/sbin/nologin shell to prevent access to the bash shell for the ftp users sudo useradd -m john -s sudo passwd john Step 5 » Now ftp server will listen on port 21. Step 4 » Restart vsftpd service using the below sudo service vsftpd restart Local_umask=022 » Uncomment the below line (line no: 120 ) to prevent access to the other folders outside the Home directory.Ĭhroot_local_user=YES and add the following line at the end.Īllow_writeable_chroot=YES» Add the following lines to enable passive mode. Uncomment the below lines (line no:29 and 33). Step 3 » After installation open /etc/nf file and make changes as follows. Step 2 » Install VsFTPD package using the below sudo apt-get install vsftpd Step 1 » Update repositories sudo apt-get update Here i’ve used VsFTPD which is lightweight and less Vulnerability. There are 3 popular FTP server packages available PureFTPD, VsFTPD and ProFTPD. This article explains how to setup FTP server on ubuntu 14.04. FTP is used to transfer files from one host to another over TCP network.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |