<?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: scp cron in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243388#M174064</link>
    <description>Very common problem: works manually, fails in cron. cron does NOT login so your 'normal' environment is non-existant. This is your cron environment:&lt;BR /&gt; &lt;BR /&gt;           HOME=user's-home-directory&lt;BR /&gt;           LOGNAME=user's-login-id&lt;BR /&gt;           PATH=/usr/bin:/usr/sbin:.&lt;BR /&gt;           SHELL=/usr/bin/sh&lt;BR /&gt; &lt;BR /&gt;So your cron job must have everything explicitly coded: full pathnames for scp and any directories or files, all env variables replaced with actual values, etc.</description>
    <pubDate>Thu, 08 Apr 2004 07:31:33 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2004-04-08T07:31:33Z</dc:date>
    <item>
      <title>scp cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243382#M174058</link>
      <description>I'm trying to scp some files from one server to another via a script. This script works fine when run from the command line but when its in cron I get the following errors and no file transfer&lt;BR /&gt;&lt;BR /&gt;Executing ssh2 failed. Command:' ssh2 -l oracle -x -a -o passwordprompt %U@%H's password:  -o nodelay yes -o authenticationnotify yes rnssupa -s sftp' System error message: 'No such file or directory'&lt;BR /&gt;&lt;BR /&gt;I'm using the full path for the scp command?&lt;BR /&gt;&lt;BR /&gt;This is on a N-Class server running HPUX11 and ssh version 2.1.0&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 08 Apr 2004 04:52:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243382#M174058</guid>
      <dc:creator>Martin Wells</dc:creator>
      <dc:date>2004-04-08T04:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: scp cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243383#M174059</link>
      <description>First thing, can you do ssh to other host without problems? Do you have private/public keys exchange set properly? If ssh has no problems, try as follows.&lt;BR /&gt;&lt;BR /&gt;scp /dir/file user@otherhost:/path/where_to_copy.&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Thu, 08 Apr 2004 05:00:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243383#M174059</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-04-08T05:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: scp cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243384#M174060</link>
      <description>Hi,&lt;BR /&gt;You must specify the full path of ssh2 or set the PATH variable at the begining of the script.&lt;BR /&gt;&lt;BR /&gt;When execute from cron you must be careful with the enviroment variables.&lt;BR /&gt;&lt;BR /&gt;Frank.</description>
      <pubDate>Thu, 08 Apr 2004 05:00:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243384#M174060</guid>
      <dc:creator>Francisco J. Soler</dc:creator>
      <dc:date>2004-04-08T05:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: scp cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243385#M174061</link>
      <description>I can ssh without issue and perform the scp command from the script when run manually and from the command line if I just use just the scp line of code?</description>
      <pubDate>Thu, 08 Apr 2004 05:03:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243385#M174061</guid>
      <dc:creator>Martin Wells</dc:creator>
      <dc:date>2004-04-08T05:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: scp cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243386#M174062</link>
      <description>Hi Martin, I don't understand very well your last query, but if it is a path problem, your command execution depends of path variable, if the user you are executing from, have the correct path you can execute they, if not you must specify the full path.&lt;BR /&gt;&lt;BR /&gt;See the .profile (sh) or .login (csh) user files to know the user path variable. &lt;BR /&gt;&lt;BR /&gt;Frank.</description>
      <pubDate>Thu, 08 Apr 2004 05:11:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243386#M174062</guid>
      <dc:creator>Francisco J. Soler</dc:creator>
      <dc:date>2004-04-08T05:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: scp cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243387#M174063</link>
      <description>What are the ssh versions installed on both systems?&lt;BR /&gt;&lt;BR /&gt;Also did you try as I told you?&lt;BR /&gt;&lt;BR /&gt;scp /dir/file user@otherhost:/path/where_to_copy.&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Thu, 08 Apr 2004 05:40:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243387#M174063</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-04-08T05:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: scp cron</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243388#M174064</link>
      <description>Very common problem: works manually, fails in cron. cron does NOT login so your 'normal' environment is non-existant. This is your cron environment:&lt;BR /&gt; &lt;BR /&gt;           HOME=user's-home-directory&lt;BR /&gt;           LOGNAME=user's-login-id&lt;BR /&gt;           PATH=/usr/bin:/usr/sbin:.&lt;BR /&gt;           SHELL=/usr/bin/sh&lt;BR /&gt; &lt;BR /&gt;So your cron job must have everything explicitly coded: full pathnames for scp and any directories or files, all env variables replaced with actual values, etc.</description>
      <pubDate>Thu, 08 Apr 2004 07:31:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-cron/m-p/3243388#M174064</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-04-08T07:31:33Z</dc:date>
    </item>
  </channel>
</rss>

