<?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 SFTP without password in scripts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-without-password-in-scripts/m-p/4382740#M732409</link>
    <description>There are two servers.&lt;BR /&gt;&lt;BR /&gt;1. SSH server&lt;BR /&gt;2. Client Server&lt;BR /&gt;&lt;BR /&gt;I need to run the script from ssh server to client server using sftp.&lt;BR /&gt;&lt;BR /&gt;Problem:&lt;BR /&gt;When i run the scripts its asking password.&lt;BR /&gt;&lt;BR /&gt;ssh01# ./do_cfg&lt;BR /&gt;Connecting to client01...&lt;BR /&gt;Password:&lt;BR /&gt;&lt;BR /&gt;content of do_cfg script:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HOSTNAME=`hostname`&lt;BR /&gt;cp -p /usr/local/bin/.netrc $HOME&lt;BR /&gt;cd /usr/local/data/&lt;BR /&gt;sftp client01 &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;cd /depot/&lt;BR /&gt;put *gz&lt;BR /&gt;EOF&lt;BR /&gt;rm $HOME/.netrc&lt;BR /&gt;&lt;BR /&gt;content of .netrc:&lt;BR /&gt;ssh01# more .netrc&lt;BR /&gt;machine client01 login root password *******&lt;BR /&gt;&lt;BR /&gt;Without asking password i need to run the script&lt;BR /&gt;&lt;BR /&gt;Kindly suggest me how to proceed further.</description>
    <pubDate>Wed, 18 Mar 2009 18:00:46 GMT</pubDate>
    <dc:creator>Arunananth</dc:creator>
    <dc:date>2009-03-18T18:00:46Z</dc:date>
    <item>
      <title>SFTP without password in scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-without-password-in-scripts/m-p/4382740#M732409</link>
      <description>There are two servers.&lt;BR /&gt;&lt;BR /&gt;1. SSH server&lt;BR /&gt;2. Client Server&lt;BR /&gt;&lt;BR /&gt;I need to run the script from ssh server to client server using sftp.&lt;BR /&gt;&lt;BR /&gt;Problem:&lt;BR /&gt;When i run the scripts its asking password.&lt;BR /&gt;&lt;BR /&gt;ssh01# ./do_cfg&lt;BR /&gt;Connecting to client01...&lt;BR /&gt;Password:&lt;BR /&gt;&lt;BR /&gt;content of do_cfg script:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HOSTNAME=`hostname`&lt;BR /&gt;cp -p /usr/local/bin/.netrc $HOME&lt;BR /&gt;cd /usr/local/data/&lt;BR /&gt;sftp client01 &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;cd /depot/&lt;BR /&gt;put *gz&lt;BR /&gt;EOF&lt;BR /&gt;rm $HOME/.netrc&lt;BR /&gt;&lt;BR /&gt;content of .netrc:&lt;BR /&gt;ssh01# more .netrc&lt;BR /&gt;machine client01 login root password *******&lt;BR /&gt;&lt;BR /&gt;Without asking password i need to run the script&lt;BR /&gt;&lt;BR /&gt;Kindly suggest me how to proceed further.</description>
      <pubDate>Wed, 18 Mar 2009 18:00:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-without-password-in-scripts/m-p/4382740#M732409</guid>
      <dc:creator>Arunananth</dc:creator>
      <dc:date>2009-03-18T18:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP without password in scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-without-password-in-scripts/m-p/4382741#M732410</link>
      <description>Hi:&lt;BR /&gt;See my commentary here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1302924" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1302924&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 18 Mar 2009 18:05:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-without-password-in-scripts/m-p/4382741#M732410</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-03-18T18:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP without password in scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-without-password-in-scripts/m-p/4382742#M732411</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;You need to setup password less login before run the script.&lt;BR /&gt;&lt;BR /&gt;- logon to serverA as user doing transfer&lt;BR /&gt;- ssh-keygen -t dsa&lt;BR /&gt;- cat ~/.ssh/id_dsa.pub (copy contents)&lt;BR /&gt;- logon to serverB as user doing transfer&lt;BR /&gt;- cd ~/.ssh&lt;BR /&gt;- vi authorized_keys (paste contents from key above)&lt;BR /&gt;&lt;BR /&gt;Make sure the following permissions are set in destination server(Server B in your case)&lt;BR /&gt;&lt;BR /&gt;Home directory should have 755 permission (users home directory)&lt;BR /&gt;$HOME/.ssh directory should have 700 permission&lt;BR /&gt;$HOME/.ssh/authorized_keys file should have 600 permission&lt;BR /&gt;&lt;BR /&gt;Refer this thread as well..&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1310366" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1310366&lt;/A&gt;</description>
      <pubDate>Wed, 18 Mar 2009 18:51:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-without-password-in-scripts/m-p/4382742#M732411</guid>
      <dc:creator>Ganesan R</dc:creator>
      <dc:date>2009-03-18T18:51:01Z</dc:date>
    </item>
  </channel>
</rss>

