<?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 and expect script in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/scp-and-expect-script/m-p/4046786#M64701</link>
    <description>You should really listen to Pablo here. Using public key authentication would help you alot as you wouldn't need to supply the credentials upon every login. &lt;BR /&gt;&lt;BR /&gt;There's also no need to open a new thread on this topic all the time.&lt;BR /&gt;&lt;BR /&gt;Lars</description>
    <pubDate>Tue, 31 Jul 2007 07:26:20 GMT</pubDate>
    <dc:creator>larstr</dc:creator>
    <dc:date>2007-07-31T07:26:20Z</dc:date>
    <item>
      <title>scp and expect script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scp-and-expect-script/m-p/4046782#M64697</link>
      <description>hi how do u do scp with expect script.&lt;BR /&gt;for ex: my remote machine ip is 201.33.4.22&lt;BR /&gt;and i have file named log in /tmp directory.&lt;BR /&gt;&lt;BR /&gt;And the below is my script .but it seems to have an error can any 1 help me out.thnks in advance.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/expect&lt;BR /&gt;&lt;BR /&gt;log_user 0&lt;BR /&gt;&lt;BR /&gt;set my_passphrase "passphrase"&lt;BR /&gt;set my_password   "hithr"&lt;BR /&gt;&lt;BR /&gt;spawn "/usr/bin/scp" "root@201.33.4.22:/tmp/logstatus2 /wys_new/log"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;while {1} {&lt;BR /&gt;  expect {&lt;BR /&gt;    "root@201.33.4.22's password:" {&lt;BR /&gt;      send "$my_password\n"&lt;BR /&gt;    }&lt;BR /&gt;#    -re "(#|\\\$|%) $" {&lt;BR /&gt;#     log_user 1&lt;BR /&gt;    #    send_user "Shell prompt found.  Dropping to shell:"&lt;BR /&gt;        send "\n"&lt;BR /&gt;         log_user 1&lt;BR /&gt;        break&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;interact&lt;BR /&gt;</description>
      <pubDate>Tue, 31 Jul 2007 01:12:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scp-and-expect-script/m-p/4046782#M64697</guid>
      <dc:creator>Karthik_sg</dc:creator>
      <dc:date>2007-07-31T01:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: scp and expect script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scp-and-expect-script/m-p/4046783#M64698</link>
      <description>Hi,&lt;BR /&gt;you can configure a publickey authentication with a null passphrase:&lt;BR /&gt;&lt;BR /&gt;login IDA@SERVER1&lt;BR /&gt;&lt;BR /&gt;SERVER1# ssh-keygen -t rsa -C "ssh_for_`whoami`@`hostname`" -f ~/.ssh/id_rsa&lt;BR /&gt;empty for no passphrase&lt;BR /&gt;&lt;RET&gt;&lt;BR /&gt;&lt;RET&gt;&lt;BR /&gt;&lt;BR /&gt;SERVER1# cp -p id_rsa.pub authorized_keys.SERVER1&lt;BR /&gt;SERVER1# chmod 600 auth*&lt;BR /&gt;SERVER1# scp -p authorized_keys.SERVER1 SERVER2:/$PWD&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;login IDB@SERVER2&lt;BR /&gt;&lt;BR /&gt;SERVER2# cat authorized_keys.SERVER1 &amp;gt;&amp;gt; authorized_keys&lt;BR /&gt;SERVER2# chmod 600 authorized_keys&lt;BR /&gt;&lt;BR /&gt;IDA@SERVER1&lt;BR /&gt;&lt;BR /&gt;SERVER1# ssh IDB@SERVER2&lt;BR /&gt;yes&lt;BR /&gt;&lt;BR /&gt;(and viceversa)&lt;BR /&gt;&lt;BR /&gt;Pablo&lt;/RET&gt;&lt;/RET&gt;</description>
      <pubDate>Tue, 31 Jul 2007 03:25:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scp-and-expect-script/m-p/4046783#M64698</guid>
      <dc:creator>paolo barila</dc:creator>
      <dc:date>2007-07-31T03:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: scp and expect script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scp-and-expect-script/m-p/4046784#M64699</link>
      <description>hi ,if i understand this properly,ur trying to explain the key from my machine and polave it in the remote machine.And by doing this the need of expect script will no longer be needed right.c the problem is this in the remote machine scp has been disabled meaning the port is closed and for all the reasons the remote key is not responding to any keys,which now leaves me only one way to go and therefore i asked the above script question.&lt;BR /&gt;Anybody willing to share the ideas are welcomed  and tell me whts wrong with the above script&lt;BR /&gt;</description>
      <pubDate>Tue, 31 Jul 2007 06:58:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scp-and-expect-script/m-p/4046784#M64699</guid>
      <dc:creator>Karthik_sg</dc:creator>
      <dc:date>2007-07-31T06:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: scp and expect script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scp-and-expect-script/m-p/4046785#M64700</link>
      <description>expect can automate scripts that manually works&lt;BR /&gt;</description>
      <pubDate>Tue, 31 Jul 2007 07:25:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scp-and-expect-script/m-p/4046785#M64700</guid>
      <dc:creator>paolo barila</dc:creator>
      <dc:date>2007-07-31T07:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: scp and expect script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scp-and-expect-script/m-p/4046786#M64701</link>
      <description>You should really listen to Pablo here. Using public key authentication would help you alot as you wouldn't need to supply the credentials upon every login. &lt;BR /&gt;&lt;BR /&gt;There's also no need to open a new thread on this topic all the time.&lt;BR /&gt;&lt;BR /&gt;Lars</description>
      <pubDate>Tue, 31 Jul 2007 07:26:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scp-and-expect-script/m-p/4046786#M64701</guid>
      <dc:creator>larstr</dc:creator>
      <dc:date>2007-07-31T07:26:20Z</dc:date>
    </item>
  </channel>
</rss>

