Use rssh to create a secure file server
At present, the company needs a Linux server as a file server, but based on security considerations, I do not want to use ftp or samba, but must allow users to upload files. What should we do?
Because it is a Linux server, you can use SSH to log on to the server and then use the SFTP function to upload and download files.
This solves the above problems, but brings about a new problem.
OpenSSH requires that you h
Remote Arbitrary Command Execution Vulnerability in rssh rsync-e
Release date:Updated on:
Affected Systems:Rssh 2.3.3Description:--------------------------------------------------------------------------------Bugtraq id: 56708CVE (CAN) ID: CVE-2012-2251
Rssh is the shell used in combination with OpenSSH. Only scp and sftp are allowed. Now supports rdist, rsync, and cvs.
Restricting the shell, like Rsh and Scponly, allows the system administrator to restrict what Linux users can do, and you can create users that will be allowed to copy files through the SCP, but will not be allowed to log on to the system's command line. This is a very important security feature that should be considered by each system administrator user to prevent unauthorized activity, such as through SSH.If you have some online storage that is used to upload more than SCP/SSH or rsync backup
allow scp tasks:
apt-get install rssh apt-get install scponly
The two customized shells complete the following tasks respectively:
When rssh limits user behavior scponly, there is only one shell of the scp command.
Now, you can modify the user's shell:
usermod -s /usr/sbin/scponly test usermod -s /usr/sbin/rssh test
And you can confiure
How to open a terminal and install SSH in Ubuntu
First, press ALT and then press f2 to open a runtime box and enter gnome-terminal. To install SSH, enter the following content in the command line. The result of sudo apt-Get install OpenSSH-server is as follows:
Klaus @ Ubuntu :~ $ Sudo apt-Get install OpenSSH-server [Sudo] password for Klaus: Reading the package list... the dependency tree of the software package being analyzed is reading status information... the following software package
wahaha@ubuntu-K55VD:~$ sudo apt-get install ssh-contact-serviceThen I enter the password for installation.
[Sudo] password for wahaha: Reading the package list... the dependency tree of the software package being analyzed is reading status information... the following additional software packages are installed: openssh-server ssh-import-id: rssh molly-guard openssh-blacklist-extra monkeysphere the following [new] software packages will be i
The company is based on security considerations, required to give users SFTP,SCP permissions can upload relevant files to the specified directory, but not SSH login, considering RSSH is also a solution, but a little trouble, and finally found the scponlyJust say the configuration process,If your system is CentOS, then use this configuration directly1.wget-chttp://nchc.dl.sourceforge.net/s...nly/scponly-4.8.tgz #scponly The supported software is SCP,
performanceWRR, weighted round-robin scheduling (weighted Round-robin), which will be based on different RS node weights assigned tasks, higher weights RS will take precedence of the task, and assigned to the number of connections will be lower than the weight of Rs node more, the same weight of Rs to get the same number of connectionsDH Destination Address Hash Dispatch (Destination Hashing) find a static hash table with the destination address as the keyword to obtain the required
that rsync maintains the source File Permission during file synchronization on the premise that rsync is anonymous or has a weak password, to improve local permissions.
Add the SUID permission bit to the bash shell locally and upload it to the server through rsync.
If you have the Shell Permission of a common user (webshell uploaded through rsync or other vulnerabilities such as weak passwords), switch to the synchronization directory and check that the permissions of the uploaded shell
press Alt first, then press F2, and a running box is displayed. Enter gnome-terminal to run the command. To install SSH, enter the following content in the command line. The result of sudo apt-Get install OpenSSH-server is as follows:
Klaus @ Ubuntu :~ $ Sudo apt-Get install OpenSSH-server [Sudo] password for Klaus: Reading the package list... the dependency tree of the software package being analyzed is reading status information... the following software packages are automatically installed
-idsuggested package S:ssh-askpass rssh molly-guard monkeyspherethe following NEW packages would be Installed:ncurses-term openssh-server op Enssh-sftp-server SSH-IMPORT-ID0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 680 KB of archives. After this operation, 5,303 KB of additional disk space would be used. Want to continue? [y/n] Get:1 http://ubuntu.uhost.hk Xenial/main i386 ncurses-term all 6.0+20151024-2UBUNTU2 [249 kb]
does not execute successfully, prompting the need for a password, even if the ssh-p port IP "command" to add the user information into Ssh-p port [ Email protected] "command" also not. Therefore, the problem is circumvented by generating the root user's public key and configuring a password-free SSH to the remote host.When trying the password, the wrong password causes the account to be locked and unable to log in, and the Faillog command can be used to view the failure record and set the login
obsolete.Second attempt to "make an offline install package"Netizen Mochuan's practice still is the value of reference. Website: http://blog.csdn.net/nupt123456789/article/details/11649603The machine that can't go online is Ubuntu15.04, I installed the same system in the networked virtual machine, and then made the offline installation package.First, download the Deb installation package$ sudo apt-get - DInstall OpenSSH-serverReading Package Lists...Donebuilding Dependency Tree Reading state in
Package List ... Complete
Analyzing Dependency tree for Package
Reading status information ... Complete
The following additional packages will be installed:
Openssh-server Ssh-import-id
Recommended Packages to install:
Rssh Molly-guard openssh-blacklist Openssh-blacklist-extra monkeysphere
The following "new" packages will be installed:
Openssh-server Ssh-contact-service Ssh-import-id
0 packages were upgraded, 3 new packages were installed,
processing performance is similar to the situationWRR weighted rotation dispatch , which assigns tasks according to the weights of different Rs. RS with higher weights will take precedence over the task, and the number of connections allocated will be more than RS with lower weights. RS of the same weighted value get the same number of connections.WLC weighted minimum number of connections scheduling , assuming that each of the RS full-time is WI, the current number of TCP connections is TI, in
ActiveConn InActConn[[emailprotected] ~]# systemctl start keepalived //启动[[emailprotected] ~]# ps aux | grep keeproot 3406 0.0 0.0 120720 1404 ? Ss 18:21 0:00 /usr/sbin/keepalived -Droot 3407 0.0 0.1 127464 3324 ? S 18:21 0:00 /usr/sbin/keepalived -Droot 3408 0.0 0.1 131656 2848 ? S 18:21 0:00 /usr/sbin/keepalived -Droot 3414 0.0 0.0 112680 976 pts/0 R+ 18:25 0:00 grep --color=auto keepAlso need to be performed o
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.