• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 476
  • Last Modified:

from Windows machine to Linux machine: ssh ok, but what is the easiest way to upload a file/folder from Windows to Linux?

Hi there;

I am  mainly using Windows machine as development environment and want to upload files to /var/www/html folder for web sites.
I am root in the system and the Linux machine is Centos and I can connect to the Linux machine via ssh, but what is the easiest way to upload a file/folder? I am not that into installing an FTP server to Centos, rather i am in seek for a command that can magically upload my files to Centos and folders which are in Windows environment.

Any hand?

6 Solutions
David Johnson, CD, MVPOwnerCommented:
use a ssh client to do it for you then.. i.e. putty/cygwin
I'd suggest winscp nice gui scp/sftp client for windows...

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

If your looking to keep a local copy of the html directory in sync with the Linux box, then you may wish to consider rsync / cwRsync / Delta Copy:

Gerwin Jansen, EE MVETopic Advisor Commented:
You can script with WinSCP as well and schedule the script from your Windows environment, nice and easy. Scripting guide is here.
If you don't want to handle username, passwords etc. then you may use instant ftp server from the sfk command line tool.

On server, in the target folder, type:
sfk sftserv -rwany .

Open in new window

Which gives write access to current dir and subdirs. On the client, for example to send folder myproject, type:
sfk list myproject +sft servername mput -up -yes

Open in new window

this will send all myproject files on first call, and only changed ones on further calls.
jazzIIIloveAuthor Commented:
Hi guys,

Note that there is only ssh server installed in the remote, ftp is not installed. Still ok? (Yes, i got ssh client in Windows but need a command or maybe this WinSCP). Let me try out, will come back very soon.

If the smbclient utility is installed on the Linux box, you would login to the Linux box, via SSH, cahange to the appropriate directory, then enter the smbclient command on the Linux box to PULL the file / files from your PC / a Server in your Workgroup / domain using your own Windows credentials, or some new Generic user credentials with access to the required files.

You could also look at scheduling (cron) the file copies, to eliminate the manual effort.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now