How do I push a file from a Linux box to a Windows Box?

5

1

How do I push a file from a Linux box to a Windows Box? Which versions of Windows have a built-in SSH server that a Linux box can "scp" (secure copy/ssh) to.

I'm looking at freesshd right now. Any more ideas?

StephenNYC

Posted 2009-01-05T18:58:22.670

Reputation: 153

Answers

10

I'm not to much skilled, but, instead of setting up a ssh server on windows, i suggest you to share a windows folder and then using samba, just copy the file to this shared folder. To a LAN a think this is a easier solution.

Bob Rivers

Posted 2009-01-05T18:58:22.670

Reputation: 665

+1 - assuming you're on a local network, this is a reasonable approach; not so much if you're looking for a remote transfer – kdgregory – 2009-01-05T19:11:13.127

1+1. If you use smbfs, you can mount the remote Windows share as a file system on Linux; then, you can just copy files back and forth. – Brian Clapper – 2009-01-11T19:09:50.233

7

Check out Cygwin. It contains an implementation of an SSH Server for Windows (OpenSSH sshd server). It works with Windows 200, XP and 2003 (with a few caveats). Here's a good installation guide. Once it is installed and working, it works like a champ and gives you some level of standardization across servers.

Nicholas

Posted 2009-01-05T18:58:22.670

Reputation: 181

6

I don't think any version of windows has built in SSH server. You can take a look at FileZilla for easily setting up a SFTP server.

Suraj Barkale

Posted 2009-01-05T18:58:22.670

Reputation:

FileZilla SFTP is client-only. No SFTP server in FileZilla. – MattBianco – 2012-06-28T08:54:33.227

1

  1. Start samba on the Linux box. This is if the 2 are in the same lan.
  2. Start a ftp server on the Linux box.
  3. Start sshd on server and copy with winscp from the linux box.

hyperboreean

Posted 2009-01-05T18:58:22.670

Reputation: 212

1

You could also pull the file with PSCP.

Max Cantor

Posted 2009-01-05T18:58:22.670

Reputation: 436

1

IIRC

  • Samba lets you access windows shares from Linux
  • SFU would let the windows side present an NFS interface
  • I haven't found any I lake but there are free and not free FTP servers for windows
  • I once a long time ago ran SSH on a windows box so it can be done.

BCS

Posted 2009-01-05T18:58:22.670

Reputation: 725

1

You can use smbclient to transfer a file via SMB (Windows file sharing).

A sample command to upload a file:

smbclient \\172.16.1.3\c$ -U jwhittal -Tc backup.995.tar pdf995/

sjbotha

Posted 2009-01-05T18:58:22.670

Reputation: 677

1

You know, working with Linux/BSD/OS X systems for so long now, you sometimes take for granted the simplest and commonest of things that you just don't get out of the box on Windows (or easily installed for that matter), like ssh/scp/rsync/etc.

Hans

Posted 2009-01-05T18:58:22.670

Reputation:

1

I'm surprised this wasn't mentioned yet, but Dropbox is an instant and very pain-free way of doing it. Works on mac, Windows, and Linux across networks.

Michael

Posted 2009-01-05T18:58:22.670

Reputation:

1

WinSCP is the best way to do this.

Of course you are pushing from Windows to Linux.

Deesbek

Posted 2009-01-05T18:58:22.670

Reputation: 303

0

If you need something fast, setup an FTP server. I recommend FileZilla. If you plan on doing this a lot, setup SAMBA so you can share drives between a Linux and Windows machine.

Jordan Parmer

Posted 2009-01-05T18:58:22.670

Reputation: 185

0

Having tried many things, The best choice seems to be to favor the remote machine, since you can't easily fiddle with settings from there. From a windows machine to a unix/linux machine, always use a SCP client to their SSH, and from unix/linux, use smb/cifs client to connect and upload to the Windows File Sharing already present there.

SingleNegationElimination

Posted 2009-01-05T18:58:22.670

Reputation: 111

-3

scp user@target:/ I am transferring files from a headless linux server which I am connected to through ssh.

user874957

Posted 2009-01-05T18:58:22.670

Reputation: 1