View the shells installed on the system: cat /etc/shells If there is no "/bin/rbash", add "/bin/rbash" to the /etc/shells file: echo "/bin/rbash" >> /etc/shells Add user tutorial: 1. Add a Linux user and grant the user a nologin shell permission. useradd username -s /sbin/nologin 2. Set the user password. passwd username 3. If you need to create this type of account frequently, create a script to facilitate your operation. After connecting to the vps with root privileges via ssh terminal, enter: vi ssh.sh !/bin/bash useradd $1 -s /bin/false Then press esc and enter :wq to save and exit edit mode. bash ssh.sh username password Username and password are the account and corresponding password you want to set, which can be replaced. Restricting users to single sign-on SSH First let /etc/pam.d/sshd connect to pam_limits.so References: |
<<: Web3k: $3/month/20GB storage/200GB traffic/unlimited cPanel accounts
>>: HostQala: $4.95/month/1 core/512M/10G/100G/1 IP/OpenVZ
LoveVPS是成立于2011年1月的主機商,僅提供VPS,有SSD VPS、KVM VPS、XE...
GigsGigsCloud, a Hong Kong merchant, now launches...
ChicagoVPS, an old and stable business, now has 3...
CloudCone is a relatively active hosting provider...
Registration code for lifetime 20% discount: reta...
finalhosting, a Czech hosting provider, mainly pr...
AuroraCloud, a Chinese merchant, was established ...
GreenValueHost has introduced VPS many times. Thi...
LAUNCH VPS, an American hosting provider, has goo...
OwOCloud is a cloud service provider from Shenzhe...
Hostwinds, a long-established American hosting pr...
NOCIX, owned by datashack.net, has its own comput...
Time4VPS is affiliated to Interneto vizija (estab...
GigsGigsCloud, a long-established business in Hon...
Hostigger, an American hosting company, was found...