Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6889447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:09:27+00:00 2026-05-27T06:09:27+00:00

To use sftp in a script without user interaction (non-interactive). For example to login

  • 0

To use sftp in a script without user interaction (non-interactive). For example to login to an anonymous ftp server and not have to manually.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:09:27+00:00Added an answer on May 27, 2026 at 6:09 am

    On your computer

    cd ~/.ssh
    ssh-keygen -t dsa
    

    press the enter key at every prompt

    Generating public/private dsa key pair.
    Enter file in which to save the key (/home/user/.ssh/id_dsa): 
    Enter passphrase (empty for no passphrase): 
    Enter same passphrase again: 
    Your identification has been saved in /home/user/.ssh/id_dsa.
    Your public key has been saved in /home/user/.ssh/id_dsa.pub.
    The key fingerprint is:
    ad:98:43:13:c9:ea:66:8e:d0:d9:66:59:d8:3a:f7:29
    The key's randomart image is:
    +--[ DSA 1024]----+
    |                 |
    |     . .         |
    |      +          |
    |     + . .       |
    |    o = S .      |
    | . + = + .       |
    |. o @ = .        |
    | . B oEo .       |
    |  . .  .o        |
    +-----------------+
    

    you will get 2 files id_dsa and id_dsa.pub use scp or other utility to copy file to your server

    scp ~/.ssh/id_dsa.pub user@host:~/.ssh/
    

    On your server

    Add the new key to the file ~/.ssh/authorized_keys.

    cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
    

    Finally change the access modes;

    chmod 600 ~/.ssh/authorized_keys
    chmod 700 ~/.ssh
    

    Verify that access mode is correct for ~

    ls -ld ~
    

    if not, you can use

    chmod 700 ~
    

    to correct your home access.

    Logout and login again

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use SharpSSH to get a file from a remote SFTP server,
I have a bash script that tests whether the sftp connection exists, very simple
I have an existing Perl script that uses the FTP object to send a
I have a PHP script which is used to resize images in a user's
How do you setup server to server SFTP to use public-key authentication instead of
I have a sftp program called transmit. I use it to access a sftp
Can anyone recommend a decent SFTP library for use with Windows C++ apps? If
Use case: user clicks the link on a webpage - boom! load of files
Use Case When a user goes to my website, they will be confronted with
I have a php script that transfers a bunch of files between servers with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.