Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SFTP Batchmode

Posted on 2012-09-16
3
Medium Priority
?
859 Views
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.
0
Comment
Question by:lsbrown1
  • 2
3 Comments
 
LVL 26

Accepted Solution

by:
arober11 earned 2000 total points
ID: 38404533
Have you considered using rsync e.g.

rsync -uav --password-file=$HOME/secret_passwd_file /local/directory/ someUser@remote.host.org:/remote/directory

Open in new window


Where: $HOME/secret_passwd_file contains just the password
0
 

Author Comment

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

Assisted Solution

by:arober11
arober11 earned 2000 total points
ID: 38416476
If you don't want to use expect or rsync, then you'll need to write your own pseudo  SFTP client e.g

http://nixcraft.com/shell-scripting/16837-automate-sftp-using-unix-script.html

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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month21 days, 3 hours left to enroll

810 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