<?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 script assistance in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/script-assistance/m-p/3712448#M21389</link>
    <description>Any help is greatly appreciated and points will be assigned. &lt;BR /&gt;&lt;BR /&gt;Write a script to securely transfer a file named "test1.log" from the server named "server2" to the server name "server1".  Use the account name of sysadmin and note any additional requirements to make the script work in an unattended mode.</description>
    <pubDate>Wed, 18 Jan 2006 14:15:24 GMT</pubDate>
    <dc:creator>Ragni Singh</dc:creator>
    <dc:date>2006-01-18T14:15:24Z</dc:date>
    <item>
      <title>script assistance</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-assistance/m-p/3712448#M21389</link>
      <description>Any help is greatly appreciated and points will be assigned. &lt;BR /&gt;&lt;BR /&gt;Write a script to securely transfer a file named "test1.log" from the server named "server2" to the server name "server1".  Use the account name of sysadmin and note any additional requirements to make the script work in an unattended mode.</description>
      <pubDate>Wed, 18 Jan 2006 14:15:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-assistance/m-p/3712448#M21389</guid>
      <dc:creator>Ragni Singh</dc:creator>
      <dc:date>2006-01-18T14:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: script assistance</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-assistance/m-p/3712449#M21390</link>
      <description>To do that, you only need scp with public key authentication.&lt;BR /&gt;&lt;BR /&gt;Create a public key pair without passphrase on server1:&lt;BR /&gt;&lt;BR /&gt;ssh-keygen -t dsa&lt;BR /&gt;&lt;BR /&gt;Copy the $HOME/.ssh/id_dsa.pub to server2 in $HOME/.ssh/authorized_keys&lt;BR /&gt;&lt;BR /&gt;On both servers run&lt;BR /&gt;&lt;BR /&gt;cd $HOME&lt;BR /&gt;chmod -R go-w .ssh&lt;BR /&gt;&lt;BR /&gt;Use scp to transfer the files from server1:&lt;BR /&gt;&lt;BR /&gt;scp test1.log server2:/destination/directory&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Jan 2006 15:10:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-assistance/m-p/3712449#M21390</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-01-18T15:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: script assistance</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-assistance/m-p/3712450#M21391</link>
      <description>scp can do this as noted above.&lt;BR /&gt;&lt;BR /&gt;to pull this off the user MUST own home diretory with 755 permissions and .ssh must have tight 655 permissions as well. Plenty of docs on this on itrc some of which I wrote.&lt;BR /&gt;&lt;BR /&gt;If port 514 is open between the machines, syslog can do it also.&lt;BR /&gt;&lt;BR /&gt;You add an entry for a second syslog or maillog&lt;BR /&gt;&lt;BR /&gt;@hostnameof server&lt;BR /&gt;&lt;BR /&gt;Like magic the log entries for one server appear on another.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 18 Jan 2006 16:58:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-assistance/m-p/3712450#M21391</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-01-18T16:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: script assistance</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-assistance/m-p/3712451#M21392</link>
      <description>After you exchange keys this script will only have one line.&lt;BR /&gt;&lt;BR /&gt;scp server2:/path/filename sysadmin@server1:/path/&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;save this line in to a file make this file executable with  chmod +x filename.&lt;BR /&gt;&lt;BR /&gt;to exchange keys:&lt;BR /&gt;ssh-keygen -d&lt;BR /&gt;then&lt;BR /&gt;scp $HOME:/.ssh/id_dsa.pub sysadmin@server1:/home/sysadmin/&lt;BR /&gt;then login to server2 as sysadmin.&lt;BR /&gt;then,while you're on server2 do:&lt;BR /&gt;cat /home/sysadmin/id_dsa.pub &amp;gt;&amp;gt; /home/sysadmin/.ssh/authorized_keys&lt;BR /&gt;At this poing you can logout and your one line script will work without prompts.&lt;BR /&gt;&lt;BR /&gt;In assumed here that the username is sysadmin -in case you use a different user simply replace sysadmin with the correct username</description>
      <pubDate>Thu, 19 Jan 2006 01:50:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-assistance/m-p/3712451#M21392</guid>
      <dc:creator>Alexander Chuzhoy</dc:creator>
      <dc:date>2006-01-19T01:50:08Z</dc:date>
    </item>
  </channel>
</rss>

