<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to send stdin to ssh command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048766#M719081</link>
    <description>How about trying the yes command?&lt;BR /&gt;&lt;BR /&gt;/usr/bin/yes | ssh &lt;SERVER&gt;&lt;/SERVER&gt;</description>
    <pubDate>Thu, 14 Aug 2003 19:56:49 GMT</pubDate>
    <dc:creator>Ronelle van Niekerk</dc:creator>
    <dc:date>2003-08-14T19:56:49Z</dc:date>
    <item>
      <title>How to send stdin to ssh command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048760#M719075</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have an issue that some programs using ssh will produce lots of errors after a system reboot.&lt;BR /&gt;This because ssh is expecting an answer, it looks like :&lt;BR /&gt;The authenticity of host '2n3 (10.164.101.17)' can't be established.&lt;BR /&gt;DSA key fingerprint is 11:59:04:46:21:2d:e0:77:db:55:c2:4e:71:82:19:86.&lt;BR /&gt;Are you sure you want to continue connecting (yes/no)?&lt;BR /&gt;&lt;BR /&gt;This is only one time. Therefor I would like to automate this as the program (run by cron every 5 minutes) cannot give feedback and just times out.&lt;BR /&gt;&lt;BR /&gt;Any ideas on how to always send a "yes" along ?&lt;BR /&gt;&lt;BR /&gt;echo yes | ssh &lt;SERVER&gt;&lt;BR /&gt;&lt;BR /&gt;Does not work. It gives the following error :&lt;BR /&gt;&lt;BR /&gt;Pseudo-terminal will not be allocated because stdin is not a terminal.&lt;BR /&gt;Any help will be apreciated.&lt;BR /&gt;&lt;BR /&gt;Regs David&lt;/SERVER&gt;</description>
      <pubDate>Thu, 14 Aug 2003 07:01:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048760#M719075</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-08-14T07:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to send stdin to ssh command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048761#M719076</link>
      <description>Hi,&lt;BR /&gt;What about using "expect" ?&lt;BR /&gt;&lt;A href="http://hpux.tn.tudelft.nl/hppd/hpux/Tcl/expect-5.38/" target="_blank"&gt;http://hpux.tn.tudelft.nl/hppd/hpux/Tcl/expect-5.38/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Tom</description>
      <pubDate>Thu, 14 Aug 2003 07:03:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048761#M719076</guid>
      <dc:creator>Tom Geudens</dc:creator>
      <dc:date>2003-08-14T07:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to send stdin to ssh command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048762#M719077</link>
      <description>Hi Tom,&lt;BR /&gt;&lt;BR /&gt;Indeed this could be an answer, although I was hoping for an easier method.&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
      <pubDate>Thu, 14 Aug 2003 07:09:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048762#M719077</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-08-14T07:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to send stdin to ssh command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048763#M719078</link>
      <description>Depending on the version of ssh,&lt;BR /&gt;try:&lt;BR /&gt;&lt;BR /&gt;echo y | ssh -t server&lt;BR /&gt;&lt;BR /&gt;      -t   Force pseudo-tty allocation.  This can be used to execute&lt;BR /&gt;           arbitary screen-based programs on a remote machine, which can be&lt;BR /&gt;           very useful, e.g., when implementing menu services.  Multiple -t&lt;BR /&gt;           options force tty allocation, even if ssh has no local tty.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;echo y | ssh -f server&lt;BR /&gt;&lt;BR /&gt;      -f   Requests ssh to go to background just before command execution.&lt;BR /&gt;           This is useful if ssh is going to ask for passwords or&lt;BR /&gt;           passphrases, but the user wants it in the background.  This&lt;BR /&gt;           implies -n. The recommended way to start X11 programs at a remote&lt;BR /&gt;           site is with something like ssh -f host xterm .&lt;BR /&gt;&lt;BR /&gt;ssh -f -n  server&lt;BR /&gt;&lt;BR /&gt;     -n   Redirects stdin from /dev/null (actually, prevents reading from&lt;BR /&gt;           stdin).  This must be used when ssh is run in the background.&lt;BR /&gt;&lt;BR /&gt;ssh -q server&lt;BR /&gt;&lt;BR /&gt;      -q   Quiet mode.  Causes all warning and diagnostic messages to be&lt;BR /&gt;           suppressed.  Only fatal errors are displayed.&lt;BR /&gt;&lt;BR /&gt;   Massimo</description>
      <pubDate>Thu, 14 Aug 2003 09:32:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048763#M719078</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-08-14T09:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to send stdin to ssh command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048764#M719079</link>
      <description>Hi Masimo,&lt;BR /&gt;&lt;BR /&gt;I already tried all options, also the -t (found it out after the post), but all options result in exactly the same question.&lt;BR /&gt;&lt;BR /&gt;Is there a way to avoid even the fingerprint question ??&lt;BR /&gt;&lt;BR /&gt;Or is there a way to let ssh accept stdin ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
      <pubDate>Thu, 14 Aug 2003 09:50:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048764#M719079</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-08-14T09:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to send stdin to ssh command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048765#M719080</link>
      <description>Hmm,&lt;BR /&gt;&lt;BR /&gt;shouldn't the key be stored once it is accepetd ? Do you generate new keys after a reboot ?&lt;BR /&gt;Check the write permission to your key-location.&lt;BR /&gt;Looks like the key is not stored, so this is why it askes all the time.&lt;BR /&gt;&lt;BR /&gt;The second point is: I think you can not redirect this, because when piped the stream is directed to the shell itself, not the ssh-client or server-process. So in case you do&lt;BR /&gt;&lt;BR /&gt;tar cvf - some_files | ssh target tar xf -&lt;BR /&gt;&lt;BR /&gt;Your streaming data on the pipe will be the tar-data, which will (and must) be completely unused for any prompts ssh is issuing for either fingerprints or logon information.&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;Volker</description>
      <pubDate>Thu, 14 Aug 2003 18:42:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048765#M719080</guid>
      <dc:creator>Volker Borowski</dc:creator>
      <dc:date>2003-08-14T18:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to send stdin to ssh command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048766#M719081</link>
      <description>How about trying the yes command?&lt;BR /&gt;&lt;BR /&gt;/usr/bin/yes | ssh &lt;SERVER&gt;&lt;/SERVER&gt;</description>
      <pubDate>Thu, 14 Aug 2003 19:56:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048766#M719081</guid>
      <dc:creator>Ronelle van Niekerk</dc:creator>
      <dc:date>2003-08-14T19:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to send stdin to ssh command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048767#M719082</link>
      <description>This question can be avoided completely by establishing the key pair.  Read through the attached document on how to do this.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Thu, 14 Aug 2003 21:09:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048767#M719082</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2003-08-14T21:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to send stdin to ssh command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048768#M719083</link>
      <description>This question can be avoided completely by establishing the key pair.  Read through the attached document on how to do this.  With the key pairs set up, secure shell won't challenge as you mention.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Thu, 14 Aug 2003 21:10:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048768#M719083</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2003-08-14T21:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to send stdin to ssh command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048769#M719084</link>
      <description>As you wrote,&lt;BR /&gt;this request for confirmation of the host key only appears for the very first time when a connection is made to a host whose public host key hasn't been registered yet in the client's $HOME/.ssh/know_hosts file.&lt;BR /&gt;It is issued deliberately to prevent from man-in-the-middle-attacks with spoofed host keys I guess.&lt;BR /&gt;You only have to distribute the public host key of any ssh servers you want to connect to (these can mostly be found, depending on your instellation, in files like /opt/ssh/etc/*.pub on the hosts where sshd procs listen) to the clients' known_hosts files in their $HOME/.ssh directories.&lt;BR /&gt;This will be done automatically when you manually confirm the question for continuing with the connection (as said only the first time).&lt;BR /&gt;You will only be asked again whenever the server's host key changed (i.e. doesn't match with the entry in the client's know_hosts file anymore).&lt;BR /&gt;Thus there must be changes of the host keys taking place between your reboots.&lt;BR /&gt;Maybe you should ask your fellow sysadmins if they created new host keys on their ssh servers?</description>
      <pubDate>Fri, 15 Aug 2003 04:56:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-send-stdin-to-ssh-command/m-p/3048769#M719084</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2003-08-15T04:56:06Z</dc:date>
    </item>
  </channel>
</rss>

