Ubuntu STDIO redirect help.

2017-01-10  Source: Original Site  Category:Ubuntu  Views:118 

Advertisement

I'm writing a GUI for rsync, ssh and a few other things on Windows.
Basically I'm launching tcsh -i, and redirecting stdout stderr and stdin.

The problem is that when ssh prompts for a password, that doesn't seem to fall under stdout or stderr. I have no idea how to get hold of this string so that I know when to send the password.

Does anyone know how I can merge these prompts with stdout so that I can read them in my program.

For example, these commands successfully redirect stdout and stderr to a file.
ls &> test
zzz &> test

But in this example, the "[email protected]'s password:" prompt is displayed in the terminal and as such, isn't of any use to me.
ssh [email protected] &> test

Any ideas would be appreciated.

Related articles
  • Ubuntu STDIO redirect help. 2017-01-10

    I'm writing a GUI for rsync, ssh and a few other things on Windows. Basically I'm launching tcsh -i, and redirecting stdout stderr and stdin. The problem is that when ssh prompts for a password, that doesn't seem to fall under stdout or stderr. I hav

  • Ubuntu apache redirect help? 2014-07-30

    I have two domain names (name1 & name2). http://name1.com & http://name2.com both go to my server at /var/www I would like it if name1 would get forwarded to name2 as am trying to phase out name1 My .htaccess file currently is Options +Follow

  • Ubuntu Command redirection help 2014-08-06

    I have googled and experimented, but can't get any love. I'm trying to figure an easy way to remove kde4 since 'apt-get autoremove kubuntu-kde4-desktop' only removes the metapackage. Here is what I think should work but doesn't remove anything: apt-c

  • Ubuntu Packets redirect help? 2015-01-30

    I have a L2TP tunnel setup on Ubuntu Server, all tunnnel traffic is in tun0. What I want to do is forward all tunnel traffic from tun0 to 172.16.1.3, meaning using 172.16.1.3 as tun0's gateway. 172.16.1.3 is reachable from eth0. In the meantime, the

  • Ubuntu Apache redirect help please 2015-03-11

    I have installed knowledge root and apache. I would like apache to redirect knowledge.localhost. to /usr/share/knowledgeroot. So i can go Http://knowledge.10.0.1.100 or http://knowledge.yserver (yserver is entry is hosts). Is this something I can do

  • Ubuntu Newbie needs help with accessing internet 2012-01-01

    Ok, so while I'm not new to computers, I just started with linux. I know nothing, but I really want to learn. However, if I could get my wireless internet working with Ubuntu that would help a ton. I currently have Vista and Ubuntu dual booted. I hav

  • Ubuntu i need help for install NRPG and msn massnger 2012-02-03

    i am download amsn and nrpg for linux when i try install i see errore box [/home/kuwait/Desktop/NRPG RatioMaster Linux/NRPG RatioMaster.exe] End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk o

  • Ubuntu ISO file - help 2012-03-01

    Hi, I'm a total noob in UBUNTU. I use Windows XP and I downloaded the file given in the website and followed the instructions to burn into a CD, it says I have to burn the downloaded ISO file, but I get a zip file with a lot of files and I can't find

  • Ubuntu New site help 2012-03-13

    I'm building a new site for Ubuntu Tips, Tricks, Help, and Games (http://jacobubuntutips.webs.com/) and I need people to help on it, I already have a few ideas like, building a system from command line, dual-boot walkthroughs, Good ubuntu games, wire

  • Ubuntu 3D Cube HELP! 2012-03-21

    i have been up an down the forums for the past 4 to 5 hours... i have done what everyone has suggested and my cube still does not work... i see that compiz is install but i cannot get the Ctrl + Alt + left mouse click to work... i have under visual e

  • Ubuntu screen capture help 2012-05-19

    evry one i just need help in the screen capture in ubuntu i know that i start with sudo apt-get install recordmydesktop to install it then i do recordmydesktop to make it start and it start and ery thing is so cool but how can i make it stop and save

  • UBUNTU 8.10 Help needed for the list of problems 2012-05-30

    frenz, I am new to the linux community, so please help me out in the problems i m encountering since the time i installed this... 1. my computer works very slow... even slower than the most slowest form of windows vista i have ever seen.. sometimes i

  • I cannot install UBUNTU!! Help. (windows 7) 2012-07-09

    So I decided to try something new and fresh. I wanted to try ubuntu. So I download the 64bit version from here. blah blah blah. I made a 25GB partition. I then Wubi found out I didn't need the original file since it was downloading something else. I

  • New to ubuntu, need driver help 2012-08-01

    I'm completely new to ubuntu, it's part of an upgrade I'm doing to make an older dell into a HTPC. That being said I replaced the oem video card with a Nvidia Geforce G100. When I install the new card ubuntu won't boot and freeze's so I'm assuming I

  • Ubuntu I neeeeeed help with TV Station 2012-09-23

    Sory about my bad english, I hope you understand me...hhihihi... :lolflag: I want to open TV station, can TV station work under ubuntu, I need help with aplicative softver, what can I use from softver, something like adobe premiere pro. I am very int

  • Ubuntu Can someone help me get my Wiimote working with Lucid and Gfceu? 2012-11-24

    I've installed the packages listed here: https://help.ubuntu.com/comhttps://help.ubuntu.com/community/CWiiDmunity/CWiiD I started wmgui and it shows the inputs for the buttons lighting up, but gfceu won't recognize any input when I press the buttons.

  • beat download rush on a new Ubuntu release and help others download faster, as well 2012-12-19

    How to beat download rush on a new Ubuntu release and help others download faster, as well. Ubuntu 9.04 "Jaunty Jackalope" shall release tomorrow i.e. 23rd April 2009. There is going to be a mad rush for downloading the release version. In fact you n

  • I am new to Ubuntu and need help 2013-01-13

    everyone, I am new to Ubuntu and need help. I have been using windows but now I want a change this is why I have also installed ubuntu 9.10 in my pc using wubi with win7. I like it a lot. For now, I do not have internet connection and when I go to th

  • Ubuntu shared libraries help 2013-01-27

    brothers please clear my doubts 1. i wrote a program wen i was using fedora ... now im using ubuntu ,.... if i try to execute it its showing like this ./lohishell: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: N

  • Ubuntu some one help me out with my sound card 2013-02-10

    I have an Creative Labs CA0106 Soundblaster and all i hear is static i cant seem to find anyway to get it to work. i'm new to ubuntu so any help would be great.