What's going on, guys? It is Bernardo. And today is all about configuring a secure
FTP server within server 2022. So let's get right into it. All right. So
first thing that I did was I want to show you guys that I am going to configure secure FTP
within a Windows Server 2022 I'm actually running version 21H2.
OK, so first thing that we need to do on the desktop is we're going to right
click on the start menu and I'm going to run Windows PowerShell as an admin
because I going to do a lot of PowerShell right now. The first command that we're
going to run is the following and we need to locate what we have so far within our system.
So I did it open SSH with an asterisk. And once you hit Enter, you're going to get this. You
should get this now. You should automatically get something that it's already installed,
and the next one is to server, which is what we are going to install right now.
So we are going to run the following command, right? And once we hit enter,
you're going to get this nice little blue tab that it is running and it's installing.
But I received this, so I was like, what is going on? I know I type that right now to fix
this issue. I'm going to show you guys how to fix it. Super simple. We're going to right click on
the start menu and we are going to just click on Run and we are going to go inside the gpedit.msc.
And within here there's a particular group policy that we need to configure
to allow us to use that particular command. So within computer configuration,
we're going to locate administrative templates. Within administrative templates, we are going to
go inside systems. And within the systems folder, we are going to locate this particular GPIO,
specify settings for optional components, installation and component repair.
So double click on that and by default it is disabled. So we are going to enable it and we are
going to pick download repair content and optional features directly from Windows Update. Instead of
the Windows Server Update services. Once you pick that option, we are going to click on Apply OK it
and we're going to close your group policy and go back inside your Windows PowerShell Command,
do a gpupdate force once everything is successful, run that command again once you hit Enter,
it's going to give you that blue tab again, but this time it is going to work.
Awesome. Now, next thing that we need to do is we need to start the services of the
SSHD. The next command that we need to do is set the services to automatically
start up. OK, so when you restart your machine it automatically starts up. So we're going to
run this particular command hit enter boom. Now the next one that we need to do, if you
have your Windows Firewall enable within your server, we need to create a new firewall rule.
I kind of recommend doing it within a GPO, but for this video,
I did it locally and I did the following command doing an inbound and the protocol
is a TCP and we are allowing port 22 and hit enter. If everything goes well,
you should get a nice little summary that everything was done and you should be good to go.
Now on the C drive, I created a root folder and this is the name that I provided
and we need to also go inside the SSH configuration file to make some changes
because again, we just basically made a root folder and we need to tell the
SSH configuration file that this is where the root folder lives. So within this particular
location right here, within programs data SSH there is a SSH config file.
So I recommend making a copy of this before you make any changes to the original, make a copy of
it. Now you're going to open up the original. So within the SSHD config file, we want to go
all the way to the bottom and locate the CH root directory, which is already set to none and we
need to change none to basically the root folder that we created within the C drive the next.
that we need to do is remove the pound sign in front of the CH root directory
and then save the file. So go back inside your Windows PowerShell
and we need to restart the services. We need to restart the SSHD services
once we do that, I went inside one of my machines and I loaded up my winSCP for the hostname.
I gave it the IP address for the username. I actually gave it an Active Directory username. And
the reason why is because my secure FTP server is part of Active Directory. So I'm able to do that
now if the server is not part of Active Directory, the way that you will provide
credentials to people is that you will create local accounts onto that server.
So once you provide that information, click on login,
it's going to give you a warning, click on yes, and it's going to load up
on your left hand side. For me, this is my local machine. On the right hand side, this is a server.
So on the left hand side, I went inside my desktop and I had a particular text file, so I dragged it
and dropped it into the right hand side and I got this nice little dialog box to upload.
So I clicked on, OK, transfer was done. Awesome. I went inside my server,
went inside my root folder and there goes my text file. Awesome. And that's
it. Hopefully you guys enjoy this video and I catch you guys on the next one peace out.