Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native ssh tty option feature #953

Merged
merged 1 commit into from
Jan 16, 2017
Merged

Native ssh tty option feature #953

merged 1 commit into from
Jan 16, 2017

Conversation

vladdnepr
Copy link

Q A
Bug fix? No
New feature? Yes
BC breaks? No
Deprecations? Yes
Fixed tickets N/A

Native ssh tty option

@vladdnepr
Copy link
Author

Hi. sudo on server sometimes require requiretty option in /etc/sudoers. Native ssh has -t option. It emulate pseudo tty and resolve the problem "sudo: sorry, you must have a tty to run sudo"

$ dep php-fpm:restart production -vvv
➤ Executing task php-fpm:restart
[server1] > cd /var/www/vhosts/project/project && (sudo systemctl reload php-fpm.service)

[Symfony\Component\Process\Exception\ProcessFailedException]
The command "ssh -A -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p '5022' -i '/home/user/.ssh/id_rsa' 'user@project' 'cd /var/www/vhosts/project/project && (sudo sy
stemctl reload php-fpm.service)'" failed.
Exit Code: 1(General error)
Working directory: /var/www/project
Output:
================
Error Output:
================
sudo: sorry, you must have a tty to run sudo

@antonmedv
Copy link
Member

@vladdnepr awesome PR! Great work. Thanks.

@antonmedv antonmedv merged commit a29f3e9 into deployphp:master Jan 16, 2017
@vladdnepr vladdnepr deleted the native-ssh-tty-option branch January 23, 2017 08:33
@vladdnepr vladdnepr mentioned this pull request Apr 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants