SFTP Batchmode

Posted on 2012-09-16
Last Modified: 2012-11-06
How setup an sftp batch job but don't have private/public keys in place for passwordless authentication? Dont want to use expect.  My vendor isn't using public and private keys? They have send me username and password to connect.
Question by:lsbrown1
    LVL 26

    Accepted Solution

    Have you considered using rsync e.g.

    rsync -uav --password-file=$HOME/secret_passwd_file /local/directory/

    Open in new window

    Where: $HOME/secret_passwd_file contains just the password

    Author Comment

    Im looking for something more like the following:
    sftp -o "batchmode no" -b sftp.batch username@servername
    LVL 26

    Assisted Solution

    If you don't want to use expect or rsync, then you'll need to write your own pseudo  SFTP client e.g

    Alternatively manually establish an SFTP session, enter the password and transfer commands.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
    Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded‚Ķ
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now