#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0

    Migrate FTP to SFTP


    Hi, I am using FTP in below shell script and it is working.Now I want to migrate from FTP to SFTP. What code changes/Steps will I have to do for SFTP ?

    FIN

    ftp -in <<FIN
    open $SAP_UP_SERVER
    user $SAP_UP_USER $SAP_UP_PASSWORD
    asc

    put $PM00_OUTPUTS_DIRECTORY/$SAP_UP_FILE_CSV /$SAP_UP_FILE_CSV
    prompt ... End File ftp dates transaction

    quit
    FIN
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    859
    Rep Power
    388

    Cool


    Originally Posted by nivarshn
    Hi, I am using FTP in below shell script and it is working.Now I want to migrate from FTP to SFTP. What code changes/Steps will I have to do for SFTP ?
    ... Etc ...
    The command would look like:
    Code:
    sftp $SAP_UP_USER@$SAP_UP_SERVER
    BUT, you may need to use "expect " because once you type the command, it will prompt for the password.
    Last edited by LKBrwn_DBA; December 26th, 2012 at 03:37 PM.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    2
    Rep Power
    0

    Migrate from FTP to SFTP


    My shell scripts are executing on Unix server and transfering files to window server 2008.

    so how to setup ssh password less login to avoid using hard-coded passwords ? Can you please give me detailed steps ?
  6. #4
  7. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    859
    Rep Power
    388

    Cool


    Originally Posted by nivarshn
    My shell scripts are executing on Unix server and transfering files to window server 2008.

    so how to setup ssh password less login to avoid using hard-coded passwords ? Can you please give me detailed steps ?
    Is Google broke for you? Here, use mine: Google
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    5
    Rep Power
    0
    Originally Posted by LKBrwn_DBA
    Is Google broke for you? Here, use mine: Google
    Yes.. agreed Google has all answers... Questions is then why have this forum..
    Last edited by clinton_eg; December 28th, 2012 at 01:53 AM. Reason: refrase
  10. #6
  11. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    859
    Rep Power
    388
    Originally Posted by clinton_eg
    ... Questions is then why have this forum..
    To answer more difficult questions?
    Otherwise we could also Google it for you and just copy/paste the solution.
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    5
    Rep Power
    0
    Originally Posted by LKBrwn_DBA
    To answer more difficult questions?
    Otherwise we could also Google it for you and just copy/paste the solution.
    I Agree.. Thanks for your reply

IMN logo majestic logo threadwatch logo seochat tools logo