Find the answer to your Linux question:
Results 1 to 2 of 2
hello all, i have to develop a script for automated sftp without using expect. I tried the batch file option (-b), but first it is asking for the password & ...
  1. #1
    Just Joined!
    Join Date
    Nov 2008
    Posts
    1

    automated SFTP without using expect

    hello all,

    i have to develop a script for automated sftp without using expect. I tried the batch file option (-b), but first it is asking for the password & then start reading the batch file. I want a solution which will do a non-interactive sftp (no need to pass the password manually). Can anyone help me to do the same.

    Thanks in advance.
    Susheela

  2. #2
    Just Joined! bclark4444's Avatar
    Join Date
    Dec 2003
    Posts
    55
    To avoid passwords with sftp, you will need to generate a public/private key pair (via ssh-keygen ). The public key needs to be added to the remote side ~/.ssh/authorized_keys file and the private key should be on the side that is executing the sftp command.

    This should get you running in the right direction.

    --Brett

Posting Permissions

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