Setup your own SSH and FTP server

Hey guys!! In today’s article we are going to setup our own SSH and FTP server so that we can get an idea about how these two servers work and what are their drawbacks.

Table of Contents:

  1. Setup SSH Server

  2. Setup FTP Server

Setup SSH Server

Install openssh-server using the command

apt-get install openssh-server

We use the command sudo systemctl status ssh to check the current status of ssh server , it’s inactive currently.

So to start the service we will use the command

sudo systemctl start ssh

We again check the status using the same command and this time our SSH server is running.

We can check it by using the nmap as :

Now you can login into the SSH using the command :


Password will be the same as of the Kali Linux “root” user password (in my case it is toor)

But when we try to login it gives us an error something like this

So to solve this error we need to edit the file /etc/ssh/sshd_config

Changes to be made in the file :

1. ”# Port 22” => “Port 22”

2. “#PermitRootLogin yes” => “PermitRootLogin yes”

Now Save the file with these changes and restart the SSH Server by typing the command :

sudo systemctl restart ssh

Now try to login to SSH Server by using the same command.

We succeed in login into the SSH.

Setup FTP Server

Install FTP Server using the command

apt-get install vsftpd

To start the service let’s run the same command.

To verify if the port is open we run the command :

nmap -p21

So let’s try to login into the FTP Server. Here we will try anonymous login . But before that we need to make some changes in the configuration file of vsftpd

Configuration file path : /etc/vsftpd.conf or it can be /etc/vsftpd/vsftpd.conf

Changes to be made:

1. anonymous_enable=YES

2. pam_service_name=ftp

After this save your file and restart the FTP server by using the command

sudo systemctl restart vsftpd

Now let’s try anonymous login into FTP server.

Username : anonymous

Password : anonymous

Command used : ftp

To install ftp please run the command apt-get install ftp

We have successfully setup both the server but the thing is there are two main problems with these servers.

In SSH Server we can try of bruteforce attack to guess the login credentials and in FTP server we can login anonymously

We will try to solve these problems in our next artcile.

So this was a basic introduction to configure SSH and FTP Server.

Recent Posts

See All

Website change notice

As you all know that our website is providing walkthrough of different challenges from different platforms and without any advertisement but due to some funds issue we can't continue this website :( S

Subscribe to HacLabs newsletter

Get priority notification on the release of the latest articles.

  • YouTube
  • Twitter
  • Instagram
  • Linkedin

© 2020 by HacLabs.