Web Hosting
Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2012
    Location
    Sweden
    Posts
    18

    Question lftp script no longer works

    Hi Guys,

    I'm on Ubuntu 12.04 and have been using a script to automatically upload images to my Phocagallery directory in my account.

    Below is the basic script:


    read -p " Press the [Enter] key continue..."

    LCD="/home/grouchygaijin/Pictures/Phoca_upload"
    RCD="/path/to/destination/directory/on/the/server"


    #DELETE="--delete"
    lftp -c "set ftp:list-options -a;
    open -u username,pass -p 18765 sftp://siteground144.com;
    lcd $LCD;
    cd $RCD;
    mirror --reverse \
    $DELETE \
    --verbose \
    --exclude-glob a-dir-to-exclude/ \
    --exclude-glob a-file-to-exclude \
    --exclude-glob a-file-group-to-exclude* \
    --exclude-glob other-files-to-exclude"
    mv /home/grouchygaijin/Pictures/Phoca_upload/* /media/Elements/"Image Staging"/


    Of course in the actual script, I have my username and the real destination path.

    The problem is that starting last week, if I click on the launcher I made to run the script I get an error:

    delaying before reconnect...


    The really weird thing is that if I open a terminal and type the name of the script to run it, about 80% of the time the script will run as it should. The other 20% of the time I get the same delaying before reconnect error.

    Do any of you SiteGround Gurus have an idea of what is happening?
    I'd really like to get my script working again.
    Attached Images Attached Images  

  2. #2
    Join Date
    Mar 2012
    Location
    Sweden
    Posts
    18

    Default

    UPDATE

    I would really appreciate any help I could get. Am I the only person using a script to upload to the server from a Linux machine?

    I thought I had solved the problem by running ssh-add /home/john/.ssh/private_key_unconverted
    That is after I ran this command yesterday the script worked when I typed in the name of the script in the terminal.
    Today Ubuntu had some updates so I ran the updates which updated the kernel and rebooted.
    After reboot, the script would not work from the launcher I created to run it.
    Furthermore it would not work when called directly from the terminal either.
    (I have no idea why this should make a difference since the launcher specifically says to open gnome-terminal and run the script.)

    So anyway, not knowing what to do I ran ssh-add /home/john/.ssh/private_key_unconverted again.
    Now the script once again works if I open a terminal and type Phoca_upload.
    If however, I run the script by clicking the quick list (launcher) in Ubuntu's dock like thing can not connect.

    The error message is:

    ---- Running connect program (ssh -a -x -s -l <my user name is here> -p 18765 siteground144.com sftp)
    ---> sending a packet, length=5, type=1(INIT), id=0
    <--- Permission denied (publickey).
    **** Peer closed connection
    ---- Disconnecting

    I went to SG tech support and they couldn't figure out what is meant by the error publickey.
    I created my key from the SG control panel and have it saved in my ~/.ssh directory.

    Does anyone have an idea of what could be wrong or a better way to do this?

    Thank you :-)

  3. #3

    Default

    The error message means that when trying to establish the connection, no valid authentication method is used. In the case with SiteGround you are allowed to use sftp/ssh only if you are authenticated with a private SSH key generated for your account. All you need to do is make sure that running this script will add your private SSH key and you will be able to accomplish the upload without any problems.

    Since the issue occurred after Ubuntu updated, I presume there is some change in the way the launcher executes the script and does not take the loaded SSH key into account. I would advise you to check the Ubuntu support forums for more information there.

  4. #4

    Default marc Jacobs

    Hi Guys, I'm on Ubuntu 12.04 and have been using a script to automatically upload images to my Phocagallery directory in my account.

  5. #5

    Default

    Find great deals on eBay for Mac Laptop Charger in Laptop Power Adapters and Chargers. Shop with confidence.

Similar Threads

  1. Connect securely using lftp
    By GrouchyGaijin in forum Hosting Related Questions
    Replies: 10
    Last Post: 04-13-2013, 06:08 PM
  2. How Much Longer Must I Wait For My Site To Return?
    By Vashnik in forum Customers' experience and suggestions
    Replies: 1
    Last Post: 03-05-2012, 09:38 AM
  3. SETLOCALE Function in CRELoaded no longer works ???
    By Lojadoca in forum Shopping Carts
    Replies: 1
    Last Post: 08-04-2008, 03:32 AM
  4. MediaWiki no longer send emails!!!
    By westie in forum Other Software and Applications
    Replies: 0
    Last Post: 07-16-2008, 10:22 AM
  5. No Image Gallery works on SITEGROUND???
    By FaraJoomla in forum General Joomla Discussions
    Replies: 5
    Last Post: 09-08-2006, 07:54 AM

Tags for this Thread

Posting Permissions

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