Find the answer to your Linux question:
Results 1 to 3 of 3
hi everyone!i need help..i don't know how to fix errors in my script..i need to get and put data in other machine using ftp..please help me..thanks! #!/bin/ksh REMOTE='000.000.0.000' USER='xxx' PASSWORD='xxx' ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2012
    Location
    Philippines
    Posts
    5

    ftp connection using korn script


    hi everyone!i need help..i don't know how to fix errors in my script..i need to get and put data in other machine using ftp..please help me..thanks!


    #!/bin/ksh

    REMOTE='000.000.0.000'
    USER='xxx'
    PASSWORD='xxx'

    source_dir='cd /usr/src'
    target_dir='cd /usr/src'

    ftp -n $REMOTE <<_FTP
    quote USER $USER
    quote PASS $PASSWORD

    bin
    lcd $source_dirpeed
    cd $target_dir

    put sample.txt
    bye
    _FTP
    exit



    error:

    ftp: connect: Connection refused
    Not connected.
    Not connected.
    Not connected.
    Local directory now /root
    Not connected.
    Not connected.

  2. #2
    Just Joined!
    Join Date
    Sep 2012
    Location
    Finland
    Posts
    96

  3. #3
    Just Joined!
    Join Date
    Sep 2012
    Location
    Philippines
    Posts
    5
    thanks for the link..

Posting Permissions

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