This website collects cookies to deliver better user experience, you agree to the Privacy Policy.
Accept
Sign In
The Texas Reporter
  • Home
  • Trending
  • Texas
  • World
  • Politics
  • Opinion
  • Business
    • Business
    • Economy
    • Real Estate
  • Crypto & NFTs
  • Tech
  • Lifestyle
    • Lifestyle
    • Food
    • Travel
    • Fashion
    • Books
    • Arts
  • Health
  • Sports
  • Entertainment
Reading: Find out how to Set Up an SFTP Server on Linux
Share
The Texas ReporterThe Texas Reporter
Font ResizerAa
Search
  • Home
  • Trending
  • Texas
  • World
  • Politics
  • Opinion
  • Business
    • Business
    • Economy
    • Real Estate
  • Crypto & NFTs
  • Tech
  • Lifestyle
    • Lifestyle
    • Food
    • Travel
    • Fashion
    • Books
    • Arts
  • Health
  • Sports
  • Entertainment
Have an existing account? Sign In
Follow US
© The Texas Reporter. All Rights Reserved.
World

Find out how to Set Up an SFTP Server on Linux

Editorial Board
Editorial Board Published January 14, 2025
Share
Find out how to Set Up an SFTP Server on Linux
SHARE

Any Linux server distribution is a really highly effective server that performs above and past what what you are promoting would possibly want. No matter process you throw on the server, it will likely be prepared. And, if it isn’t prepared out of the field, you can also make it so.

In the event you aren’t certain about SFTP, it’s the FTP service constructed into Safe Shell (SSH), which permits customers to securely push and pull recordsdata to and from the server, utilizing SSH.

I’m going to stroll you thru the method of establishing an SFTP server. I’ll show by making a single person that’s restricted to solely SFTP logins. As soon as you know the way to do that, you may create as many customers as you want. This course of will work on any Linux distribution.

Let’s make it work.

SEE: Troubleshooting Linux: An Admin’s Information (TechRepublic Premium)

What you’ll want

You’ll want entry to an account with admin rights. When you’ve procured that entry, it’s time to make this work.

SFTP Listing

The very first thing we should do is create a listing that may home our FTP knowledge. Open up a terminal window, su to the basis person (sort su after which, when prompted, sort the basis person password), after which difficulty the next two instructions:

mkdir -p /knowledge
chmod 701 /knowledge

SEE: Find out how to Add an SSH Fingerprint to Your known_hosts File in Linux (TechRepublic)

Create the SFTP group and person

Now we’re going to create a particular group for SFTP customers. That is executed with the next command:

groupadd sftp_users

Now we’re going to create a particular person that doesn’t have common login privileges, however does belong to our newly created sftp_users group. What you name that person is as much as you. The command for that is:

useradd -g sftp_users -d /add -s /sbin/nologin USERNAME

The place USERNAME is the title of the person.

Subsequent, give the brand new person a password. This password would be the password the brand new customers use to log in with the sftp command. To arrange the password, difficulty the command:

passwd USERNAME

The place USERNAME is the title of the person created above.

SEE: Find out how to Begin, Cease, and Restart Providers in Linux (TechRepublic)

Create the brand new person SFTP listing

Now we’re going to create an add listing, particular to the brand new person, after which give the listing the right permissions. That is dealt with with the next instructions:

mkdir -p /knowledge/USERNAME/add
chown -R root:sftp_users /knowledge/USERNAME
chown -R USERNAME:sftp_users /knowledge/USERNAME/add

The place USERNAME is the title of the brand new person you created above.

Configure sshd

Open up the SSH daemon configuration file with the command:

nano /and so on/ssh/sshd_config

On the backside of that file, add the next:

Match Group sftp_users
ChrootDirectory /knowledge/%u
ForceCommand internal-sftp

Save and shut that file. Restart SSH with the command:

systemctl restart sshd

SEE: 5 Greatest Linux CentOS Substitute Choices & Options (TechRepublic)

Logging in

You’re all set to log in. From one other machine in your community that has SSH put in, open up a terminal window and difficulty the command:

sftp USERNAME@SERVER_IP

The place USERNAME is the title of our new person and SERVER_IP is the IP deal with of our SFTP server. You’ll be prompted for USERNAME’s password. When you efficiently authenticate, you can be greeted with the sftp immediate. Sort pwd to examine the working path and it’s best to see /add as depicted within the picture beneath.

Find out how to Set Up an SFTP Server on Linux
After you have got efficiently accomplished authentication, you will notice the sftp immediate. Picture: Jack Wallen

A easy resolution

That’s all there may be to establishing an SFTP server on Linux. For any firm trying to provide employees and shoppers a easy, safe technique of importing and downloading recordsdata, this can be a not solely an awesome resolution but in addition very finances pleasant one. Get your SFTP server up and working with zero price and 0 headache.

This text was initially revealed in September 2019. It was up to date by Antony Peyton in January 2025.

TAGGED:LinuxServerSETSFTP
Share This Article
Twitter Email Copy Link Print
Previous Article Roasted Sausage and Potatoes Roasted Sausage and Potatoes
Next Article Diddy’s Legal professionals Declare ‘Freak Off’ Intercourse Tapes Show His Innocence Diddy’s Legal professionals Declare ‘Freak Off’ Intercourse Tapes Show His Innocence

Editor's Pick

Sizzling Lady Summer time Begins within the Bathe—Right here’s Learn how to Prep Your Pores and skin

Sizzling Lady Summer time Begins within the Bathe—Right here’s Learn how to Prep Your Pores and skin

We might obtain a portion of gross sales if you buy a product by a hyperlink on this article. Most…

By Editorial Board 8 Min Read
Alpine’s Sizzling Hatch EV Has a Constructed-In, ‘Gran Turismo’ Model Driving Teacher

One other win over its Renault 5 sibling is a multi-link rear…

3 Min Read
Louis Vuitton Is Dropping a New Perfume As a result of It’s Sizzling | FashionBeans

We independently consider all beneficial services and products. Any services or products…

2 Min Read

Latest

“A Family’s Fight to Reclaim Their Legacy”

“A Family’s Fight to Reclaim Their Legacy”

Introduction: For generations, the Wright family has worked and lived…

July 9, 2025

AR Global Inc CEO Kason Roberts Donates to Support Kerrville Storm Victims, Mobilizes Team for Restoration Efforts

Kerrville, Texas — In the aftermath…

July 9, 2025

Bitcoin Tops $109,000 After Senate Passes Trump’s ‘Big Beautiful Bill’ – “The Defiant”

The crypto market posted modest good…

July 9, 2025

Two vital hazard alerts within the June employment report – Indignant Bear

Two vital hazard alerts within the…

July 9, 2025

Simone Biles Thirst Traps in Bikini Amidst Boob Job Hypothesis

Studying Time: 3 minutes Simone Biles…

July 9, 2025

You Might Also Like

Part of Pulwama IED was ordered through Amazon: FATF | India Information
World

Part of Pulwama IED was ordered through Amazon: FATF | India Information

NEW DELHI: International terror financing watchdog Monetary Motion Process Power (FATF) has raised issues concerning the exploitation of e-commerce platforms…

3 Min Read
Dementia hope as new weight-reduction plan linked to 53% drop in Alzheimer’s danger
World

Dementia hope as new weight-reduction plan linked to 53% drop in Alzheimer’s danger

A dietary strategy combining components of the Mediterranean and Sprint consuming patterns may cut back the danger of growing Alzheimer’s…

3 Min Read
10 arrested at drug cartel “ranch of horror” discovered responsible of homicide in Mexico
World

10 arrested at drug cartel “ranch of horror” discovered responsible of homicide in Mexico

Ten males arrested at a farm linked to a drug cartel within the Mexican state of Jalisco had been discovered responsible…

5 Min Read
‘Manasi’ initiative launched to assist psychosocial rehabilitation of girls in shelter residence
World

‘Manasi’ initiative launched to assist psychosocial rehabilitation of girls in shelter residence

Left to Proper – Fr. R Jesudas, Govt Director, Caritas India, Ms Zoraida Samuel, Managing Trustee, Rehoboth Public Charitable Belief,…

1 Min Read
The Texas Reporter

About Us

Welcome to The Texas Reporter, a newspaper based in Houston, Texas that covers a wide range of topics for our readers. At The Texas Reporter, we are dedicated to providing our readers with the latest news and information from around the world, with a focus on issues that are important to the people of Texas.

Company

  • About Us
  • Newsroom Policies & Standards
  • Diversity & Inclusion
  • Careers
  • Media & Community Relations
  • WP Creative Group
  • Accessibility Statement

Contact Us

  • Contact Us
  • Contact Customer Care
  • Advertise
  • Licensing & Syndication
  • Request a Correction
  • Contact the Newsroom
  • Send a News Tip
  • Report a Vulnerability

Term of Use

  • Digital Products Terms of Sale
  • Terms of Service
  • Privacy Policy
  • Cookie Settings
  • Submissions & Discussion Policy
  • RSS Terms of Service
  • Ad Choices

© The Texas Reporter. All Rights Reserved.

Welcome Back!

Sign in to your account

Lost your password?