Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sftp

Status
Not open for further replies.

mouse123

IS-IT--Management
Dec 16, 2002
82
US

How to avoid passwd prompting in the script.

I am wondering is there any script for sftp automation.

Thanks in advance
 
You cal also use batch mode for non-interactive login, but user and password will have to be in a parameter file

have a look to sftp -b your_batchfile_name in the man pages of sftp
 
When I use the batch mode like

sftp -b test.cmd

it is not working

my test.cmd file
open stg@10.90.1.42
put test.txt
quit
 
Public key authentication is the answer.

It's safer as well, no brute force password attacks can be done on the server if the server SSHD is set up to not allow for password authentication.

The only security risk is to keep your private key safe from hackers, once they obtain that they can log on too. You can use a passphrase for your private key to make it more hacker proof, but that brings you back to the exact same problem you have now.

IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter
 

How do I configure the chroot for sftp?

Thanks
 
Use a package called "scponly"

IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top