SCP in CLI script

Post Reply
kave_dish
Member
Posts: 4
Joined: 25 Feb 2013 09:30

SCP in CLI script

Post by kave_dish »

Hi,

I'm trying to use a CLI script to export a file via SCP. The script uses the scp command, and then enters the password when prompted. It contains lines akin to:

Code: Select all

scp filename.dat user@location
mypassword
However, since the password prompt isn't the standard user prompt (it's literally just "Password:", instead of "devicename#"), the script won't drop in the "mypassword" line. Is there any way to get this working?
sadim
Alcatel Unleashed Certified Guru
Alcatel Unleashed Certified Guru
Posts: 691
Joined: 02 Jun 2006 07:11
Location: Portugal

Re: SCP in CLI script

Post by sadim »

Hi,
try: sshpass -p "mypassword" scp filename.dat user@location

Regards
kave_dish
Member
Posts: 4
Joined: 25 Feb 2013 09:30

Re: SCP in CLI script

Post by kave_dish »

sadim wrote:Hi,
try: sshpass -p "mypassword" scp filename.dat user@location

Regards
Thanks for the reply. No luck. It didn't recognize the sshpass command. Here's the failure message:

CLI command "sshpass -p "mypassword" filename.dat user@location" failed. CLI output is Last result:Error: Bad command.
kave_dish
Member
Posts: 4
Joined: 25 Feb 2013 09:30

Re: SCP in CLI script

Post by kave_dish »

I should clarify - I'm running these commands on a 7750s.
Post Reply

Return to “5620 SAM”