Mysecureshell is an open source, lightweight and secure FTP server based on open SSH you can install in major Linux distribution.
Follow the steps below to make a working secure FTP server using MySecureShell on CentOS.
The easiest way to install MySecureShell server on your vps is to do via repository which luckily can be added in few seconds.
Login to your server as root user.
You have to firstly edit /etc/yum.conf file. So do it using your favorite text editor like Nano:
In Nano, scroll down the page and put these lines in the end part:
[mysecureshell] name=MySecureShell baseurl=http://mysecureshell.free.fr/repository/index.php/centos/$basearch/ enabled=1 gpgcheck=0
Save the changes and exit the editor
Finally update your server so the newly added repository can be applied.
yum update -y
After that use command below to start the installation:
yum install mysecureshell -y
That’s it. MySecureShell is now ready-to-use.
Now we will see how to use it:
To use it, first we have to find where MySecureShell is installed.
For that, run:
Output will show you the mysecureshell installation path.
Now, add a new user with the following command:
useradd -m -s /usr/bin/mysecureshell unixmen passwd unixmen
You can also assign the existing users to access and use MySecureShell using below command:
usermod -s /usr/bin/mysecureshell sk
Connect to your SFTP server from your clients as shown below.
sftp [email protected]
Also you can use any FTP clients such as FileZilla to login your SFTP server.
Open your favourite FTP client (Ex.FileZilla). Enter sftp://IP-address, user name, password, and SFTP port 22 and click Connect.
Note: The main MySecureShell config file is /etc/ssh/sftp_config and it works fine with default configuration.
Some useful commands for mysecureshell: