WhileNetworking

  • Home
  • CCNA
  • Cisco Packet Tracer Download
    • Cisco packet tracer 6.3
    • cisco packet tracer 6.2
    • Cisco Packet Tracer 7
  • Linux Server Management
  • About Us
  • Privacy Policy
  • Contact Us

Setup sftp server linux

You are most welcome to this post.
Setup sftp server linux
Really thanks to you for your interest in this topics. :)

Hi, today we’ll discuss about SFTP Server. SFTP stand for secure File Transfer Protocol. For the Setup sftp server linux, you can secure your system more. Sometimes it is highly recommended to use SFTP protocol in the file transfer service. It is considered as most secure file transfer system, because, there is a encryption technique between the client and the FTP server.

Setup sftp server linux

So to active the SFTP service we basically need the openssh server. If it is previously installed in your server then you need not to install it again. But if it is not installed then you need to install it. So we may consider that in our server openssh is not installed. So lets install it.

[root@localhost ~]# yum -y install openssh-server

Now you need to create a separate group for the FTP server and the access to the server.

[root@localhost ~]# groupadd ftpgrp

 

Now we need to open the openssh configuration file and need to make some change in it. You can make change as following:

Find and comment the below line ( Line no : 147 ).

#Subsystem sftp /usr/libexec/openssh/sftp-server

and add these lines below.

Match group ftpgrp

ChrootDirectory %h

X11Forwarding no

AllowTcpForwarding no

ForceCommand internal-sftp

Now we need to restart the openssh server and its service.

[root@localhost ~]# systemctl restart sshd

So we can say that our service is configured and it is ready for work.

Now, what we can do, we can create user for the group we have created named as ftpgrp

[root@localhost ~]# useradd -m jim -s /sbin/nologin -g ftpgrp

[root@localhost ~]# passwd jim

So we have successfully created user. And now we need to change the permission of this user using the root user. Lets do this:

[root@localhost ~]# chown root /home/jim

[root@localhost ~]# chmod 750 /home/jim

Now lets create a directory in the www inside the home directory to change or modify the ownership.

[root@localhost ~]# mkdir /home/jim/www

[root@localhost ~]# chown jack:ftpgrp /home/jim/www

So the process completed, now you can access the SFT server using this new account. You may use different types of FTP client like Filezilla.

Now you may have a question in your mind that, we’ve made a FTP and SFTP server, so how a user can get access to both the servers. You just need to change the permission. From the previous post of FTP configuration, you may find that, we’ve created a user named jim. So we need to give jim user to access the newly created group of SFTP. Lets do this.

[root@localhost ~]# usermod jim -g ftpgrp

[root@localhost ~]# chown root /home/jim

[root@localhost ~]# chmod 750 /home/jim

[root@localhost ~]# mkdir /home/jim/www

[root@localhost ~]# chown jim:ftpgrp /home/jim/www

 

So we’ve successfully done this step. Hope that after this post, you will be able to configure SFTP server perfectly. If you have any kinds of question related to this post, then please feel free to comment. Have a nice day.  🙂

Nov 18, 2016Himadri
 

Share with friends :

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to email a link to a friend (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to print (Opens in new window)

Related

Setup ftp server linuxAn overview of Holographic Technology using Femtosecond Laser

Leave a Reply Cancel reply

14 + 4 =

Himadri

Hi, I'm Himadri. I love blogging with tech topics, specially computer networking. We'll have more fun in the upcoming day. Stay with me. :)

November 18, 2016 11 Comments Linux installation and server managementsftp server351
Feel Free to Share :)
0
GooglePlus
0
Facebook
0
Twitter
0
Digg
0
Delicious
0
Stumbleupon
0
Linkedin
0
Pinterest
Find Us on Facebook
Choose a category !!
  • CCNA
  • Cisco Certification Exam
  • cisco packet tracer 6.2
  • Cisco packet tracer 6.3
  • Cisco Packet Tracer 7
  • Cisco Packet Tracer 7.1
  • Cisco Packet Tracer 7.2.1
  • Cisco Packet Tracer 7.3
  • Cyber Security
  • Engineering Ebooks
  • Excel
  • IELTS Ebook
  • Internet
  • Know computer
  • Know your computer
  • Laser Processing of Material
  • Linux installation and server management
  • PDF
  • Technology
  • Uncategorized
Top posts
  • Free download Principles of Electronics by VK Mehta
  • The Diffie-Hellman (DH) algorithm
  • Free download Cisco Packet Tracer 7.3 for Windows 64 bit
Archieves
Get latest updates by Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 19 other subscribers
W
SC
wordpress counter
Analytics
Recent Comments
    Browse by categories
    Cyber SecurityLinux installation and server managementCCNAKnow your computerKnow computerCisco Packet Tracer 7UncategorizedCisco Certification ExamInternetPDFCisco Packet Tracer 7.3Engineering EbooksCisco packet tracer 6.3cisco packet tracer 6.2Cisco Packet Tracer 7.1TechnologyExcelLaser Processing of MaterialCisco Packet Tracer 7.2.1IELTS Ebook
    Feel free to contact with us

    Hi, any kind of comment or suggestion is valuable to us. So feel free to contact with us.

    Email: himadri.shekhar.bd@gmail.com

    Name: WhileNetworking.com

    2021 © WhileNetworking