You can use AllowUsers / AllowGroups if you have only a few users/groups that are allowed to login via ssh or DenyUsers / DenyGroups if you have only a few users/groups that are not allowed to login. Note that this only restricts login via ssh, other ways of login (console, ftp, …) are still possible. You need to add these options to your /etc/ssh/sshd_config file for most ssh installations.
If you have set the login shell to /bin/false you can use su -s /bin/bash user
(replace /bin/bash with the shell of your choice)
Related Posts:
- How to run command as user who has /usr/sbin/nologin as Shell?
- how to disable SSH login with password for some users?
- How do I extract login history?
- What is the difference between /sbin/nologin and /bin/false?
- What’s a .sh file?
- How to fix ‘sudo: no tty present and no askpass program specified’ error?
- How do I grep recursively?
- What does pss mean in /proc/pid/smaps
- apt-get error: Sub-process /usr/bin/dpkg returned an error code (1)
- error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’ — Missing /var/run/mysqld/mysqld.sock
- How do I grep recursively?
- how to find libstdc++.so.6: that contain GLIBCXX_3.4.19 for RHEL 6?
- How to extract C source code from .so file?
- subprocess.Popen(): OSError: [Errno 8] Exec format error in python?
- How to substitute shell variables in complex text files
- How can I recursively find all files in current and subfolders based on wildcard matching?
- Curl command for https ( SSL )
- “sed” command in bash
- How to exclude a directory in find . command
- How can I find all *.js file in directory recursively in Linux?
- Argument list too long error for rm, cp, mv commands
- Difference between using “chmod a+x” and “chmod 755”
- ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known
- WSL – GEDIT Unable to init server: Could not connect: Connection refused
- Python subprocess.Popen “OSError: [Errno 12] Cannot allocate memory”
- Install tkinter for Python
- How to open some ports on Ubuntu?
- Given two directory trees, how can I find out which files differ by content?
- Uncompress tar.gz file
- What does it mean to mount a file system in linux?
- curl: (6) Could not resolve host: google.com; Name or service not known
- How to pass password to scp?
- scp gives “not a regular file”
- -bash: fork: Cannot allocate memory
- Explanation of polkitd Unregistered Authentication Agent
- CentOS error – sudo: effective uid is not 0, is sudo installed setuid root?
- Merge / convert multiple PDF files into one PDF
- scp from Linux to Windows
- Bash script: bad interpreter
- PHP and mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
- How to grep and replace
- node.js: cannot find module ‘request’
- What is the reason and how to avoid the [FIN, ACK] , [RST] and [RST, ACK]
- What does “&” at the end of a linux command mean?
- How to recursively download a folder via FTP on Linux
- httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName
- How do I write stderr to a file while using “tee” with a pipe?
- How to include file in a bash shell script
- Does Mac OS X use Linux?
- bash sh – command not found
- Hosting multiple WordPress sites on single server – best practices?
- moving server can not login
- WordPress Update – This is usually due to inconsistent file permissions.: wp-admin/includes/update-core.php
- Can scp copy directories recursively?
- Copying a large directory tree locally? cp or rsync?
- What are the functional differences between .profile .bash_profile and .bashrc
- Check if port is open or closed on a Linux server?
- Why does my hostname appear with the address 127.0.1.1 rather than 127.0.0.1 in /etc/hosts?
- Linux command to inspect TXT records of a domain [closed]
- When does `cron.daily` run?
- How to run a command multiple times, using bash shell?
- How to reconnect to a disconnected ssh session
- What does a + mean at the end of the permissions from ls -l?
- Should I quit using Ifconfig?
- SSL Certificate Location on UNIX/Linux
- What is “-bash: !”: event not found”
- What version of RHEL am I using?
- Keeping a linux process running after I logout
- Force dig to resolve without using cache
- How do you make it obvious you are on a production system?
- How can I verify if TLS 1.2 is supported on a remote web server from the RHEL/CentOS shell?
- How to forcibly close a socket in TIME_WAIT?
- How to check if an RSA public / private key pair match
- Mount CIFS Host is down
- Colors in bash after piping through less?
- List of files installed from apt package
- How to copy a large number of files quickly between two servers
- Why does sudo command take long to execute?
- Allow SFTP but disallow SSH?
- “POSSIBLE BREAK-IN ATTEMPT!” in /var/log/secure — what does this mean?
- How to display certain lines from a text file in Linux?
- Can you have more than one ~/.ssh/config file?
- What is this IP address: 169.254.169.254?
- How can I export the privileges from MySQL and then import to a new server?
- Is there a directory equivalent of /dev/null in Linux?
- Can I send some text to the STDIN of an active process running in a screen session?
- How can I get processor/RAM/disk specs from the Linux command Line? [duplicate]
- Should I install Linux applications in /var or /opt?
- Is there a way to see the execution tree of systemd?
- How to determine the hostname from an IP address in a Windows network?
- Heartbleed: how to reliably and portably check the OpenSSL version?
- create home directories after create users
- How can I fully log all bash scripts actions?
- How do I redirect subdomains to a different port on the same server?
- Running Cron every 2 hours [duplicate]
- How to check the physical status of an ethernet port in Linux?
- What does “debconf: delaying package configuration, since apt-utils is not installed” mean?
- Testing UDP port connectivity
- In Linux, what is the difference between “buffers” and “cache” reported by the free command?
- memcache vs memcached?