The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Automatically copying files from server to local drive? Sepia UNIX for Dummies Questions & Answers 1 06-05-2008 09:24 PM
Transfer file from local unix server to remote server indira HP-UX 2 05-02-2007 02:15 PM
FTP multiple files from remote server to local server berlin_germany Shell Programming and Scripting 2 12-20-2006 12:24 AM
Copying files from laptop to remote server using SSH patwa UNIX for Dummies Questions & Answers 3 11-22-2006 01:14 AM
copying files to a remote aix server using tar! system-admin AIX 2 11-17-2006 12:30 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 02-07-2007
Registered User
 

Join Date: Nov 2006
Posts: 23
Copying files from a remote server to local system with cygwin

Hi. I'm sorry if I get on people's nerves asking this, but I don't really understand how to do this and unfortunately don't have the time to work through it step by step in books, etc.

At University, we have a unix server that hosts our files. we each have a login and password to access it. I would like to copy the files in my home directories there to my laptop. due to security, the only way I'm even able to access the files let alone do anything with them is to ssh in through cygwin which I've installed.

I do:
ssh -l username host
password

Then I can cd to the directories. But here's where I'm stuck.

I'm not sure of the format to copy a file to my home directory on my cygwin, because home when I'm logged into the server is the home directory on the server. But if I open another cygwin window, I can't seem to access the Uni files in the other window.

My laptop has an IP address from the wireless network I'm connect to.

Can anyone help me with this please? I'm sure it simple, basically copying from HOME where I'm logged in to HOME on my laptop but how do I specify the laptop? Is it just the IP/home as in 139.133.123.456/home?

sorry if this is too vague, they're not prepared to take people through the basics of Unix, well transferring between computers like this anyway as I'm the only one that needs to do it due to not being able to access the Unix systems directly (partially sighted).

Thanks.
Reply With Quote
Forum Sponsor
  #2  
Old 02-16-2007
Registered User
 

Join Date: Mar 2006
Posts: 8
I think you should use sftp to transfer the files from your university account to your laptop.

The thing is quite easy: first, working in your laptop's cygwin, go into the directory where yo want the files to get transfered.
Then, connect to your university using sftp program, sftp username@host and then enter your pasword. Once you are in, cd to the directory where your files are. You can now use the comand "get" to transfer the files to your laptop: get file1, get foo.txt, etc.

I hope this helps you (I've read your message quickly)
Reply With Quote
  #3  
Old 02-21-2007
Registered User
 

Join Date: Nov 2006
Posts: 23
Thanks. I eventually just used a windows client, as i couldn't get the get command to work for a whole directory. How can I do it the other way around?

I have one terminal logged into my website with ssh. I'm in the directory i want to upload to.

I have another terminal where i'm in the directory which comtains files and folders i want to transfer. how do I copy those files and folders to the directory in the first terminal?

Thanks.

H.
Reply With Quote
  #4  
Old 06-12-2008
Registered User
 

Join Date: Apr 2008
Posts: 3
USE scp to transfer your files:

on your cygwin command prompt type command like this;

scp -r <user_name>@<host_name or host_ip>:<Path to your directory> <target_path_dir>

For eg.
Source dir= /home/patwa/mywork
Host= UnixServer
User Name= patwa
Target dir=/cygdrive/d/patwa

then command will look like this:
scp -r patwa@UnixServer:/home/patwa/mywork /cygdrive/d/patwa

if above command gives error for "/cygdrive/d/patwa"
than
cd /cygdrive/d/patwa

scp -r patwa@UnixServer:/home/patwa/mywork .
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0