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 7072089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:45:58+00:00 2026-05-28T05:45:58+00:00

My goal: having a shellscript for a cronjob (on MacOSX Snow Leopard) that connects

  • 0

My goal:

having a shellscript for a cronjob (on MacOSX Snow Leopard) that connects to a Debian machine with ssh (public/private key login), executes a tar command and downloads the tarred file afterwards.

My problem:

The login works, also the execution of some commands. But how can I download a file back to the local machine?

This is what I have so far:

This is the content of the shell script so far:

#!/bin/bash
ssh user@remotehost << 'ENDSSH'
tar -C / -czf /home/user/stuff.tar.gz /home/user/stuff
ENDSSH
  • 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-28T05:45:59+00:00Added an answer on May 28, 2026 at 5:45 am

    Short and simple, no heredoc needed.

    ssh -Te none user@remotehost "tar -C / -cz /home/user/stuff" >stuff.tar.gz
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Goal: Having two buttons that should be enable to add or delete data from
I am having trouble animating a custom UITableView section header. The goal was to
I'm having trouble reading and writing QByteArray data to a file. My goal is
My goal is to return a start and end date having same value in
having some issues with a networking assignment. End goal is to have a C
I am having difficulties to use my custom IComparer for my SortedDictionary<>. The goal
I am having a problem that is strange to me but hopefully is not
Rather than having a bunch of links that are all different sizes, I want
My goal is to stop having to have a local copy and a live
I am planning on having 3 fragmentlists contained within one activity. The goal is

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.