PDA

View Full Version : SSH from Script not recognizing password. Ok from terminal with same command



Marwynne_Kuhn
November 28th, 2015, 05:29 AM
I .can run the script it works until i enter the password. It fails with the password. I can run the following and it works every time. "scp pxfer.sh pi@192.168.254.8:/home/pi" logs in no problem It only fails when I run the script.
It appears to be the packets are changed when I send it from the script. Any ideas , I have searched the web with know success. I run both with debug and only find sending packets from the script does not authenticate. Thanks in advance for any assistance.


#!/bin/sh

clear

echo " Pi Transfer"
echo
echo
echo
echo "Type the name of the file you want to transfer."
echo
read NAME
echo
echo $NAME
echo
scp -vvv $NAME kitfox@192.168.254.8:/home/pi
echo

Irihapeti
November 28th, 2015, 07:54 AM
Thread moved to Programming Talk.

Lars Noodén
November 28th, 2015, 02:58 PM
Can you provide the output of the script when using scp -v (instead of -vvv) ?