Build sftp with mysecureshell in CentOS
O & M personnel should have such requirements on the file server:
1. Modify the server to store important files.
2. plaintext transmission is not allowed.
3. Lock the user directory.
4. You cannot log on to linux.
5. restrict the access speed and number of login users.
Our company often has such requirements, and the security department explicitly prohibits plaintext transmission of information related to user names and passwords. Here, mysecureshell can be used to meet this requirement.
Install the rpm package according to the following requirements, and change your shell to MySecureShell. As follows:
Generally, the yum source does not exist. You need to download it from the official website. Http://mysecureshell.sourceforge.net/en/download.html
There are many versions in it. You can download different versions based on your system requirements. In fact, it depends on your openss-devel version.
My version is CentOS6.2. Because openssl has been updated, I downloaded the version for centos6.4. Please note that.
You can use rpm for installation. Such as: rpm-vih mysecureshell-1.33-1.x86_64.rpm
If you do not know where the configuration file of the installation package is, run the following command to find it.
Rpm-qc package name, which is rpm-qc mysecureshell.
Main Content in the configuration file:
GlobalDownload/GlobalUpload is used to set the global download speed.
Whether StayAtHome locks users in their home directories.
LimitConnection sets the maximum number of connections.
LimitConnectionByUser/LimitConnectionByIP limits the maximum number of connections of each user/ip address.
Home specifies where the user directory is.
At this time, for example, test1 user, modify/etc/passwd. Change to mysecureshell as follows:
You do not need to restart any service. Use sftp software for testing. I often use winscp in windows.
The logon interface is as follows:
This method is a good solution I have used. You are welcome to propose other good solutions.
Configure the SFTP environment for non-SSH users in Linux
Set up FTP server and Apache server on Ubuntu
Install the LAMP \ vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04
Simple case of anonymous uploading of SeLinux and vsftpd on the RHEL6 Platform
Install vsftpd source code in Linux
Case study of vsftpd Security Configuration