<?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: SSH remote command execution fails from batchmode in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651692#M50274</link>
    <description>When logging in from batch mode SSH will not read login files on the remote host.&lt;BR /&gt;&lt;BR /&gt;In my case, /etc/profile (remote user is bash) is not read and the standard environment variables are therefore not available and the remote program fails.&lt;BR /&gt;&lt;BR /&gt;I can fix this on the Solaris side, so it is not a major issue for me. Still something to be aware of.</description>
    <pubDate>Wed, 19 Oct 2005 05:13:01 GMT</pubDate>
    <dc:creator>Gerhard Olsson</dc:creator>
    <dc:date>2005-10-19T05:13:01Z</dc:date>
    <item>
      <title>SSH remote command execution fails from batchmode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651687#M50269</link>
      <description>When I execute a command on a remote host using SSH single commands, the command fails on the remote host. The reason seems to be that the remote pseudo terminal is not setup properly, and a program called by the script fails.&lt;BR /&gt;&lt;BR /&gt;This could be a problem with the remote program, but this works fine from DCL interactive mode when I specify batch mode. There seem to be something that is different from batch. However, I can see that a pseudo terminal is allocated on the remote system, both from interactive and batchmode. If in interactive mode, batch mode is enabled from command line.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;$ ssh -t -o "BatchMode yes" testuser@10.1.2.57 "testscript parameter"&lt;BR /&gt;&lt;BR /&gt;Where test script is like:&lt;BR /&gt;#!/bin/sh&lt;BR /&gt; who am i&lt;BR /&gt; OtherProg $*&lt;BR /&gt;&lt;BR /&gt;Output like:&lt;BR /&gt; testuser /dev/pts/2   Oct 18 15:05&lt;BR /&gt; failure to get parameter to OtherProg&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;OpenVMS 7.3-2, TCPIP 5.4 ECO5&lt;BR /&gt;Remote: Solaris 9 (OpenSSH based)&lt;BR /&gt;Public key authentication, without password&lt;BR /&gt;&lt;BR /&gt;Hints what is happening in batch mode, or shall I blame the Solaris program?&lt;BR /&gt;&lt;BR /&gt;/Gerhard</description>
      <pubDate>Tue, 18 Oct 2005 08:22:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651687#M50269</guid>
      <dc:creator>Gerhard Olsson</dc:creator>
      <dc:date>2005-10-18T08:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: SSH remote command execution fails from batchmode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651688#M50270</link>
      <description>Please read the TCPIP V5.5 release notes.&lt;BR /&gt;&lt;BR /&gt;It says, SSH, SFTP, and SCP commands may not work correctly with sys$input, sys$output, and sys$error devices in batch mode. and it may send unexpected &lt;CR&gt; characters to the output files here and there.&lt;BR /&gt;&lt;BR /&gt;Try directing output to any files.&lt;BR /&gt;$ assign xxx.dat sys$output.&lt;BR /&gt;&lt;BR /&gt;  &lt;BR /&gt;Archunan&lt;/CR&gt;</description>
      <pubDate>Tue, 18 Oct 2005 19:07:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651688#M50270</guid>
      <dc:creator>Arch_Muthiah</dc:creator>
      <dc:date>2005-10-18T19:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: SSH remote command execution fails from batchmode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651689#M50271</link>
      <description>I have read the Release Notes and since ECO5 SSH mostly works according to the notes. There are number of limitations still, but I can get around them. SSH execution on the OpenVMS side seems to be working.&lt;BR /&gt;&lt;BR /&gt;The problem in this situation is that SSH seems to identify itself differently on the _remote_ side when running in batch mode. Since it is working from interactive mode (even when I specify BatchMode), the implementation on the Solaris side is not completely broken.&lt;BR /&gt;&lt;BR /&gt;Gerhard</description>
      <pubDate>Wed, 19 Oct 2005 02:57:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651689#M50271</guid>
      <dc:creator>Gerhard Olsson</dc:creator>
      <dc:date>2005-10-19T02:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: SSH remote command execution fails from batchmode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651690#M50272</link>
      <description>Hi Gerhard,&lt;BR /&gt;&lt;BR /&gt;The link below discuss about your SSH/Solaris issues? &lt;BR /&gt;&lt;BR /&gt;They were talking about -b option with the batchfile to read the input from ( but with SFTP) &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.computing.net/unix/wwwboard/forum/7006.html" target="_blank"&gt;http://www.computing.net/unix/wwwboard/forum/7006.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Archunan&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 19 Oct 2005 03:24:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651690#M50272</guid>
      <dc:creator>Arch_Muthiah</dc:creator>
      <dc:date>2005-10-19T03:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: SSH remote command execution fails from batchmode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651691#M50273</link>
      <description>The -b parameter for sftp is used to read commands (instead of reading from std input). Not really related to this problem.&lt;BR /&gt;&lt;BR /&gt;Regarding the link: SSH in OpenVMS will disable all password based authentication methods if in batch mode (or option "BatchMode yes" is set as in my example).&lt;BR /&gt;&lt;BR /&gt;Thanks for the hints though. I guess that what I am looking for is a way to get OpenVMS SSH to identify itself the same from interactive and batch mode.&lt;BR /&gt;&lt;BR /&gt;A few more observations:&lt;BR /&gt;1.&lt;BR /&gt;If I do not allocate a pseudo terminal on the remote side "-t" parameter, the remote program fails also from Interactive mode. &lt;BR /&gt;$ ssh -o "BatchMode yes" testuser@10.1.2.57 "testscript parameter"&lt;BR /&gt;&lt;BR /&gt;2.&lt;BR /&gt;If I call the Solaris program directly, it succeeds:&lt;BR /&gt;$ ssh -t -o "BatchMode yes" testuser@10.1.2.57 "OtherProg parameter"&lt;BR /&gt;(still not a workaround, the script performs some inititialations before the prog).</description>
      <pubDate>Wed, 19 Oct 2005 03:44:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651691#M50273</guid>
      <dc:creator>Gerhard Olsson</dc:creator>
      <dc:date>2005-10-19T03:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: SSH remote command execution fails from batchmode</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651692#M50274</link>
      <description>When logging in from batch mode SSH will not read login files on the remote host.&lt;BR /&gt;&lt;BR /&gt;In my case, /etc/profile (remote user is bash) is not read and the standard environment variables are therefore not available and the remote program fails.&lt;BR /&gt;&lt;BR /&gt;I can fix this on the Solaris side, so it is not a major issue for me. Still something to be aware of.</description>
      <pubDate>Wed, 19 Oct 2005 05:13:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/ssh-remote-command-execution-fails-from-batchmode/m-p/3651692#M50274</guid>
      <dc:creator>Gerhard Olsson</dc:creator>
      <dc:date>2005-10-19T05:13:01Z</dc:date>
    </item>
  </channel>
</rss>

