Expect script to remote SSH between 2 servers
<p>I am new to expect scripting, I have a case where I need to run a script on a on a server that contains our backups that will send a command to my firewall device that will send a backup to an internal FTP server. My snippet is</p>

<pre><code>#!/usr/bin/expect
set PASS="password"
spawn ssh admin@10.3.0.1 -p 4118   #Firewall Device IP
expect "Password:" 
send "$PASS\r"
</code></pre>

<p>For some reason when running this small snippet of code by itself it still asks for a password to be entered.</p>

<p>I applied the changes suggested by Joao Vitorino, it' no longer asking for a password but it is throwing these errors:</p>

<pre><code>   TEST.sh: spawn: not found
   TEST.sh: expect: not found
   TEST.sh: send: not found
</code></pre>