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

Posted on 2012-09-16
Last Modified: 2012-10-04
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?

Question by:jazzIIIlove
    LVL 77

    Expert Comment

    by:David Johnson, CD, MVP
    use a ssh client to do it for you then.. i.e. putty/cygwin
    LVL 11

    Assisted Solution

    I'd suggest winscp nice gui scp/sftp client for windows...
    LVL 5

    Assisted Solution

    LVL 26

    Assisted Solution

    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:
    LVL 37

    Accepted Solution

    You can script with WinSCP as well and schedule the script from your Windows environment, nice and easy. Scripting guide is here.
    LVL 1

    Assisted Solution

    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.
    LVL 12

    Author Comment

    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.

    LVL 26

    Assisted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    One of the features I've come to appreciate about Windows 7 and Windows Server 2008 R2 is the ability to pin applications to the task bar. As useful a feature as I've found this, it does have some quirks.  For example, have you ever tried pinning an…
    It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
    This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
    This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    6 Experts available now in Live!

    Get 1:1 Help Now