Solved

How to copy information from windows to linux using SSH

Posted on 2014-01-22
8
648 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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
 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ubuntu not booting - How get past GRUB? 3 43
is my large folder zipped corrupted 4 67
error log using ftp 7 41
awk to variable in bash 2 43
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 …
We all know how boring and exhausting it is to transfer huge web projects developed locally to a webserver simply via FTP. The File Transfer Protocol is a really nice solution if you need to transfer small amounts of files, but if you're plannin…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…

803 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