Solved

How to copy information from windows to linux using SSH

Posted on 2014-01-22
8
647 Views
Last Modified: 2014-02-02
HI

I have Linux CentOS server virtualized by virtualbox  and running over a windows server 2003 in which there are some files that  I need to copy to Linux Server using SHH, but I don't know how, is that possible?

I have putty.exe in windows in order to connect it from windows to linux.

Regards.
0
Comment
Question by:dimensionav
8 Comments
 
LVL 6

Accepted Solution

by:
Jordan Medlen earned 63 total points
ID: 39801404
You can use filezilla to do this.

https://filezilla-project.org/

It is an FTP client, so it works the same way. I use this as my client of choice to make similar file transfers.
0
 
LVL 19

Assisted Solution

by:NickUpson
NickUpson earned 63 total points
ID: 39801415
you can also use winscp

http://winscp.net/eng/index.php

it can use ftp or scp (based on ssh)
0
 
LVL 5

Assisted Solution

by:piwowarc
piwowarc earned 63 total points
ID: 39801451
Hi

SCP based copy is the simplest as guys already stated.  You have more choices though. If you have Virtual Box Guest Additions installed in this linux VM you can map folder of physical machine to VM. Linux distributions normally support SMB file sharing as well so you can either create share in VM guest or map physical machine into location of VM.

Bot those solutions have benefit over SCP over SSH. If you plan to use it in production it's way safer than openining machine via SCP (user has all filesystem access by default and way more difficult to restrict it).

Choice is yours my friend. Your usage case should give you answer which solution will be best for you.

Regards
0
 
LVL 4

Assisted Solution

by:tmx84
tmx84 earned 63 total points
ID: 39801528
scp c:\directory\* username@ip or hostname:/directory

Here is the SCP Command if you are using Putty...

the first directory is obviously local and the second is the ssh remote computer.. you would just reverse this to do it the opposite way.. you could copy files from linux to local like this as well.  If you use \* it will copy everything in the directory, or you can specify the file name...

Here are more examples if you need them...

http://www.hypexr.org/linux_scp_help.php

Otherwise the above options will work as well... Using an SFTP will probably be the easiest.. but if you would like to venture out and use Putty, you can!
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 62 total points
ID: 39801534
You can use WinScp client.

http://winscp.net/eng/index.php

It is easy to use drag and drop but if I understand you correctly, you don't even need that if the VM (VM Box) resides on the same machine then all you need is to share a folder between the VM and the host machine.

For virtual box, all you need to do is:
Machine --> Setting menu

Select shared folder.  And put a folder name on the Windows side.

For the linux side, you need to install the VM Box package so that Linux mounts it.  From the "Devices" menu, select "Insert Guest Additions CD image".  This should create some package on your Desktop in Linux and you have to follow instructions to install it.  Once done, this is a much better way to share a folder between host and guest.
0
 
LVL 21

Assisted Solution

by:Mazdajai
Mazdajai earned 62 total points
ID: 39802012
You can use pscp from the putty suite . It has been answered here.

http://www.experts-exchange.com/OS/Linux/Q_28209471.html#a39398859
0
 
LVL 29

Assisted Solution

by:Sudeep Sharma
Sudeep Sharma earned 62 total points
ID: 39803615
Another method would be rsync, that would help in case if you need to schedule the copy/move of file and also in case of backups.

For rsync from Windows to Linux you can use Ultra copier which is not only replacement for windows copy move feature but it also has rsync module which could be used to copy the files to Linux.

http://ultracopier.first-world.info/
0
 
LVL 5

Assisted Solution

by:NARANTHIRAN
NARANTHIRAN earned 62 total points
ID: 39808317
U can mount the Windows directory  to Linux system  and copy the files in ssh mode..

Try the following to command to mount and copy the files.

[root@masterdns]# mount -t cifs //192.168.1.100/Share -o username=username, password=password /var/window

[root@masterdns]# Cp filename  newfilename
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

932 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

12 Experts available now in Live!

Get 1:1 Help Now