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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:55:38+00:00 2026-06-01T01:55:38+00:00

I have some files which need to be sftp from machine B ( linux

  • 0

I have some files which need to be sftp from machine B ( linux ) to machine C. We need to start the task in machine A ( windows server 2003 ) and schedule this in Windows Scheduler. How can I do it?

I would do it interactively like this:

  1. ftp the files from machine A to machine B.
  2. telnet to machine B.
  3. with the telnet, sftp from machine B to machine C, put the files from machine B to machine C.

How can I do this with a script in machine A which is a windows? I can’t install any other software to help.

  • 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-06-01T01:55:39+00:00Added an answer on June 1, 2026 at 1:55 am

    You mentioned ftp, telnet, and sftp. Those could be scripted via something like expect, or via some possibly complex script on A. However, you might be able to use this unix trick to do it all from A. You’ll need to be able to ssh from A to B, and from B to C. You’ll need identity authentication setup, so that a password is not required for those connections. (You could use agent forwarding of the identity on A for both connections.) Then run something like this on A:

    cat file-on-a | ssh B "ssh C 'cat > file-on-c'"
    

    That will move the file from A to C, via B, without storing the file on B.

    I have done this sort of thing on windows before using the ssh and cat that is part of Cygwin. I don’t know how well it would work with other windows tools…

    EDIT: I should have said a word to two about how that command works. The ssh program provides a pipe of sorts to move data back and forth between the local and remote machine. Normally, this pipe is connected to a shell on the remote end and it serves the same purpose as telnet, except with better security. However, this pipe can be used for anything. The sftp utility uses that pipe to move files around. The ssh command can take a command to execute on the remote system. For example, ssh B ls would connect to B, run ls, and send the results back to you. What the above command does is ssh to B, and ask B to run an ssh connecting to C. That gives us a pipe from A, to B, to C. Now, what to do at both ends? The cat program reads files and writes them to standard out. If no file names are given, it reads standard in. The cat file-on-a read the file on the A machine and writes it to the ssh command. The cat > file-on-c reads the data sent to it and the > file-on-c part (thanks to the shell) writes that to the file file-on-c.

    Again, not sure if this is an option in your environment. Hope it helps.

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

Sidebar

Related Questions

I have an app which generates some files in the app directories I need
I have some php files in a server which generate xml code in them.
I have copied some files from project A to project B, both of which
so I have multiple HTML files which I need to get some praticular data
I have some larger files which I need to share with people and to
I have a folder in which I have some files and sub-folders. I need
I'm writing a shell script which will rsync files from remote machines, some linux,
I have some large files (images and video) which I need to store in
I have some files which need to be placed in a specific directory on
I have some .csv files which I'm using as part of a test bench.

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.