Description of problem: while invoking remote shell script through ssh from rhel 5 to rhel 5 I am getting error "tcgetattr: Invalid argument" I try like this "ssh -t -t -l user host "./shell script". same process is working fine if I invoke it from solaris to linux. Version-Release number of selected component (if applicable): rhel5 How reproducible: like just try to start a java process remotely. Steps to Reproduce: 1.local script contains ssh command and remote script to execute 2.run local script it ssh and start the process . 3. its unable to feed result to orginated program ( source ssh connection ) instead gives error "tcgetattr: Invalid argument" Actual results: Expected results: Additional info:
Reassigning to the openssh component. This has nothing to do with SSSD.
Thanks for the report sunil. I can reproduce the problem using the reproducer below (the part with the error), although in my case the commands get executed correctly. Please note that I think you have to pipe the commands to ssh instead of passing the local script. [root@machine1 ~]# cat test echo $HOSTNAME exit [root@machine1 ~]# cat test | ssh -t -t root@machine2 root@machine2's password: tcgetattr: Invalid argument Last login: Wed Jan 25 05:52:46 2012 from machine1 [root@machine2 ~]# echo $HOSTNAME machine2 [root@machine2 ~]# exit logout Connection to machine2 closed.
(In reply to comment #0) > Description of problem: > > while invoking remote shell script through ssh from rhel 5 to rhel 5 I am > getting error "tcgetattr: Invalid argument" I try like this "ssh -t -t -l user > host "./shell script". > Why do you need "-t -t"? Is there any other input in source ssh script then terminal? > > Steps to Reproduce: > 1.local script contains ssh command and remote script to execute > 2.run local script it ssh and start the process . > 3. its unable to feed result to orginated program ( source ssh connection ) > instead gives error "tcgetattr: Invalid argument" > Running and capturing output of remote scripts/commands works as expected even with "-t -t": $ echo $date $ date=`ssh -t -t localhost date` user@localhost's password: Connection to localhost closed. $ echo $date Wed Jan 25 13:42:25 CET 2012
(In reply to comment #2) > Thanks for the report sunil. I can reproduce the problem using the reproducer > below (the part with the error), although in my case the commands get executed > correctly. Please note that I think you have to pipe the commands to ssh > instead of passing the local script. > > [root@machine1 ~]# cat test > echo $HOSTNAME > exit > > [root@machine1 ~]# cat test | ssh -t -t root@machine2 > root@machine2's password: > tcgetattr: Invalid argument > Last login: Wed Jan 25 05:52:46 2012 from machine1 > [root@machine2 ~]# echo $HOSTNAME > machine2 > [root@machine2 ~]# exit > logout > Connection to machine2 closed. If you need to run local script on remote system then you should add remote shell as command instead of running remote login shell: $ cat > test date exit $ cat test | ssh localhost bash user@localhost's password: Wed Jan 25 13:49:39 CET 2012 $
A simple local command has no issue like date, ls, cat etc..Sorry I didn't elaborate much earlier.. I don't not see output or its broken after that mentioned error. the output when I run certain (shell script that invokes java process) daemons in debug or interactive mode on remote server from a local script with ssh command to remote. moreover, I am invoking local shell script from a cgi interface through web browser that ssh to remote host and execute a process there. same coding same configuration is running fine if I hit request from a solaris server to rhel5 without any error .. but from rhel5 to rhel5 it gives error. I think its rhel family issue , pls look at below url: http://docs.fedoraproject.org/en-US/Fedora/13/html/SELinux_FAQ/index.html#id3028932
Why do use use '-t -t'? Do you need terminal? Is the stdout and stderr connected to ssh process sufficient? Does it work without '-t -t'? If it is SELinux related, it should work with SELinux permissive mode: # setenforce 0 If it work, you can find SELinux AVC messages in audit log or via this command: # ausearch -m avc -ts recent
I can confirmed this issue is still present in RHEL 5.8 as well as RHEL 6.3. We have a script which runs from "cron" (and thus has no local tty) which needs a remote tty (default "sudo" configuration still exists on some hosts). We capture both standard output and standard error in the process and the error message being printed on standard error is annoying. To reproduce: $ ssh -qtt localhost tty </dev/null tcgetattr: Inappropriate ioctl for device /dev/pts/2 This bug is not present in stock OpenSSH 5.5p1: $ ssh -qtt localhost tty </dev/null /dev/pts/5 $ ssh -v OpenSSH_5.5p1, OpenSSL 0.9.8x 10 May 2012
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days