You can also restrict keys to permissible commands (in the authorized_keys file).
I.e. the user would not log in via ssh and then have a restricted set of commands but rather would only be allowed to execute those commands via ssh (e.g. “ssh somehost bin/showlogfile”)
More Related Contents:
- Automatically enter SSH password with script
- Pseudo-terminal will not be allocated because stdin is not a terminal
- Avoid gnome-terminal close after script execution?
- Passing variables in remote ssh command
- write a shell script to ssh to a remote machine and execute commands
- create a file with prefix =file1 followed by the random number
- Why to code a script which will check if some package is installed in linux and if not then install it?
- How to pass command output as multiple arguments to another command
- Is there a way to change the environment variables of another process in Unix?
- Aborting a shell script if any command returns a non-zero value
- Shell script: Run function from script over ssh
- How can I quickly sum all numbers in a file?
- Bash script process substitution Syntax error: “(” unexpected
- What is the difference between using `sh` and `source`?
- How do I setup Public-Key Authentication? [closed]
- Setting environment variables in Linux using Bash
- How do I exclude a directory when using `find`?
- Run a shell command when a file is added
- Get last dirname/filename in a file path argument in Bash
- Docker Alpine executable binary not found even if in PATH
- Bash script execution with and without shebang in Linux and BSD
- bash command not found when setting a variable
- Shell command to tar directory excluding certain files/folders
- Exit code of variable assignment to command substitution in Bash
- How to compare two DateTime strings and return difference in hours? (bash shell)
- Linux/Unix command to determine if process is running?
- Recursive search and replace in text files on Mac and Linux
- Counter increment in Bash loop not working
- Check for IP validity
- Why doesn’t “sort file1 > file1” work?