Results 1 to 2 of 2

Thread: File Transfer Script using SCP?

  1. #1
    Join Date
    Apr 2007
    Beans
    67
    Distro
    Ubuntu 8.04 Hardy Heron

    File Transfer Script using SCP?

    Hello,

    I am writing a script for a remote Ubuntu machine. When the script completes, I want it to automatically save the resultant text file to my computer. I thought this might be accomplished via the secure copy (scp) command. I can call the scp command remotely, but I don't know how to give it my machine's password such that it can copy the files to my computer automatically.

    I tried writing a similar version to automatically upload a file to the remote machine from my computer just to see if I could get it to work. I tried:
    Code:
    scp /local/file/path user@remote_server:/remote/filepath < access.txt
    where access.txt contains my password to the server. When I ran the script in the terminal, I am just prompted for my password to the remote machine. Is there some method that scp can find my machine's password either in a textfile or in the script itself so that it can automatically upload a file to my computer?

    Thanks,
    igfud
    .... .- -- .-. .- -.. .. --- .-. ..- .-.. . ...

  2. #2
    Join Date
    Nov 2005
    Location
    NEK Vermont
    Beans
    Hidden!
    Distro
    Ubuntu UNR

    Re: File Transfer Script using SCP?

    man page:
    Code:
    man scp
    offers -i option to specify the file where the key is stored.

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
  •