Error "standard in must be a tty" when doing ssh username@server 'sudo command'
When
gives “standard in must be a tty”. First solution: Edit your /etc/sudoers file, by using visudo command:
comment out the line “Defaults requiretty”.
A most secure way should be to add:</p>
Second solution: forcing allocation of a pseudo-tty.by using -t option
Additional information
This behaviour is not the default. Only Redhat distributions of sudo that had requiretty in its default sudoers. It will be fixed in newer releases
If you found this post or this website helpful and would like to support our work, please consider making a donation. Thank you!
Help UsArticles in the same category
- Trouver rapidement et facilement l'adresse mac courante sous Linux
- How to Get or Extract filename and extension in bash
- How to check exit status of a command line in BASH ?
- Fast and easy way to get mac address on Linux
- Error "standard in must be a tty" when doing ssh username@server 'sudo command'
- Disable the usage of history using HISTSIZE,HISTFILE
- Désactiver l'historique en utilisant HISTSIZE,HISTFILE
- Comment vérifier le statut d'exécution d'une commande en BASH ?
- Comment extraire le nom et l'extension d'un fichier en Bash
- Back to previous directory in shell cd,$OLDPWD
- Linux Bash