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:
Setup SSH Server
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 :
ssh 192.168.43.8
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 192.168.43.8

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 192.168.43.8
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.