Results 1 to 3 of 3

Thread: SSH from Script not recognizing password. Ok from terminal with same command

  1. #1
    Join Date
    Mar 2015
    Beans
    1

    SSH from Script not recognizing password. Ok from terminal with same command

    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

  2. #2
    Join Date
    Jul 2007
    Location
    Tāmaki Makau-rau, NZ
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: SSH from Script not recognizing password. Ok from terminal with same command

    Thread moved to Programming Talk.
    Ubuntu membership via Forums contributions
    BACKUP before installing or upgrading.

  3. #3
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: SSH from Script not recognizing password. Ok from terminal with same command

    Can you provide the output of the script when using scp -v (instead of -vvv) ?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •