No tty present and no askpass program specified

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers No tty present and no askpass program specified
# 1  
Old 10-31-2016
Wrench No tty present and no askpass program specified

I am trying to rsync files from NodeA to NodeB.

Using the below command.


Code:
/usr/bin/rsync  -v -a -e "ssh" --rsync-path="sudo -u msd rsync" /home/ansible/templates/app/Sprint6/webapps eric@NodeB:/opt/msdp/ca/iam_cac

I can only ssh into NodeB as eric user but I want files placed as msd user.

I am getting this ERROR:

Code:
sudo: no tty present and no askpass program specified
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=3.0.6]

On the remote node, I have given eric sudo provlegaes.

Code:
eric ALL = NOPASSWD: /usr/bin/rsync

is there something else that I am missing ?
# 2  
Old 10-31-2016
sudo looks trying to execute the command interactivly, use the -s option (or check the man sudo to get the relevant options & syntax depending on your OS)

Last edited by ctsgnb; 10-31-2016 at 01:36 PM..
# 3  
Old 10-31-2016
sudo won't need to do anything interactive unless it requires a password, is the thing. That's exactly what the error means - that it needs to ask for a password but has no means to do so.

Does sudo work in shell when you ssh to eric@nodeb?
# 4  
Old 10-31-2016
I have passwordless access enabled to nodeB.

Code:
[ansible@nodeA]$ ssh eric@nodeB
Last login: Mon Oct 31 12:55:35 2016 from 10.169.102.6
[eric@nodeB ~]$

# 5  
Old 10-31-2016
Yes, ssh works, but does sudo?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Python: Redirecting to tty and reading from tty

In bash, you can do something like this: #!/bin/bash echo -n "What is your name? " > /dev/tty read thename < /dev/tty How can I do the same in python? I have a python script that has the following content: #!/usr/bin/python2.7 import getpass import sys import telnetlib import... (2 Replies)
Discussion started by: SkySmart
2 Replies

2. Solaris

[Solved] No tty present and no askpass program specified!

Hi Guys, I use a script sdcmdeploy.ksh to deploy java application to respective dev/test environment. This script is being executed on SunOS. These apps are weblogic apps & the script internally calls weblogic deploy script to deploy application to weblogic cluster. But at this point it... (2 Replies)
Discussion started by: raj100
2 Replies

3. UNIX for Dummies Questions & Answers

linux sudo: no tty present and no askpass program specified

Hi I have an Oracle DBA that is trying to install an RPM from Stratavia which is a web based portal and it executes the following: Instance Wrapper=sudo -u oracle /opt/datapalette/jython/jython Server Wrapper=sudo -u root /opt/datapalette/jython/jython I've compared the /etc/sudoers... (8 Replies)
Discussion started by: jeff-fafa
8 Replies

4. Red Hat

sudo: no tty present and no askpass program specified

i am trying overide the below error sudo: sorry, you must have a tty to run sudoi am aware of ssh -t option. But just experimenting with OS :D So, tried commenting out Defaults requiretty from my sudoers file after which i am getting the below error sudo: no tty present and no askpass... (4 Replies)
Discussion started by: chidori
4 Replies

5. UNIX for Advanced & Expert Users

Error - sudo: no tty present and no askpass program specified

Hi I am trying to automate the deployment of a tar ball onto a set of remote servers and am getting this error from the ssh - sudo: no tty present and no askpass program specified What I have done is add some code into the user's ssh key that does a few things like delete the existing... (2 Replies)
Discussion started by: steadyonabix
2 Replies

6. Shell Programming and Scripting

how to execute a program present on another server using SFTP in perl

Hi, I want to execute a program which is present on another server. i want to use SFTP in perl, is it possible? how ? thanks. (1 Reply)
Discussion started by: anandgodse
1 Replies

7. UNIX for Advanced & Expert Users

tty changes?

I am not sure if I am using the correct terminology but somehow my tty keeps changing on me. The man pages are confusing to me on what exactly the tty is. This is what I see when I run the tty command. Could anyone explain why my tty keeps changing? ~ $ tty /dev/pts/1 ~ $ tty /dev/pts/0 (6 Replies)
Discussion started by: cokedude
6 Replies

8. Red Hat

sudo: no tty present and no askpass program specified

Hi Gurus: Can you help me get out of this message ? I already commented out the ff line in /etc/sudoers file but still prompts me for this message. #Defaults requiretty -sh-3.2$ ./check_diskErrors itag3.pm.staging.intra /dev/sda sudo: no tty present and no askpass program specified... (3 Replies)
Discussion started by: linuxgeek
3 Replies

9. AIX

tty

Hi All can anyone tell me what is the meaning of tty,or give me an example of this? (1 Reply)
Discussion started by: magasem
1 Replies
Login or Register to Ask a Question