• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Using PuTTy to copy files from linux server to Windows Desktop

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

SeanBest

Member
Joined
Aug 14, 2006
Location
Harrisonburg, VA
Ok, so basically I'm using PuTTy and I'm accessing the linux servers on campus at school. Last semester I was using PuTTY and a FileZilla, but this semester (although they says they changed nothing) I am unable to connect to the servers with FileZilla or WinSCP, it just says Connection Refused. So I'm wondering what commands would I use in PuTTY to copy files from a directory or a directory in whole from these servers to my desktop.

Example:

n-drive/Fall09/CS239/Lab01 -- where the files are located

C:/ -- where I want them to go

I know PuTTy will take basic linux commands, but I've looked all over and haven't found anything yet, hoping someone here can.


Hopefully this was the right section too, wasn't sure whether I should put it in networking or here ...


Thanks ins advance!
 
putty uses scp to transfer files over I believe

If you have already ssh'd into the directory where the file is:

Code:
scp [file to be copied] some_user@my_ip:[destination_folder]
some_user would be your login name and destination folder is pretty obvious

so as an example on my network
Code:
scp file.txt [email protected]:/home/leoniteous/Documents

if not

Code:
scp login_name@server_hosting_file:[path_to_file] [destination]

So at home

Code:
scp [email protected]:/media/tv/some_tv.avi /storage

viola. Over the internet is more complicated by the same idea and I would recommend ssh'ing into the dir where the file is as its the least complicated way

Assuming you have logged into the school computer from home

Code:
scp file.txt login@INTERNET_IP -R [port]:local_ip:[port]:[destination]

looks like

Code:
scp file.txt [email protected] -R 22:192.168.1.111:22:/home/leoniteous/Documents
 
Last edited:
Cool. i'll have to give these a try. I realized however I made a stupid mistake, at school today I named the folder Fall 2009 (a space between Fall and 2009) and now whenever I do anything it just uses Fall and the the 2009. It says 'Fall' isn't found or whatever. I tried renaming it but again I can't access the whole Fall 2009 name. Might just have to wait til tomorrow. Don't feel like going back on campus tonight.
 
Cool. i'll have to give these a try. I realized however I made a stupid mistake, at school today I named the folder Fall 2009 (a space between Fall and 2009) and now whenever I do anything it just uses Fall and the the 2009. It says 'Fall' isn't found or whatever. I tried renaming it but again I can't access the whole Fall 2009 name. Might just have to wait til tomorrow. Don't feel like going back on campus tonight.
Try this
Code:
Fall\ 2009
 
I could be mistaken but I think the '/' is a special character like the space, if this is the case it needs an escape just like the space
Code:
C:\/

Also note that linux and therefore putty are case sensitive. Unless I am mistaken I believe windows uses the ToLower() function to convert all of their strings to lower case...

so the folder 'MOVIES' is actually read in asci as 'movies'. If this is indeed the case then having a C drive and having a c drive actually makes the difference
 
Code:
scp file.txt login@INTERNET_IP -R [port]:local_ip:[port]:[destination]

Get ssh: connect to host 22 port 22: Invalid arguements when I tried this as well. Obviously I filled in the info.
 
Tried changing it to a lowercase c ... it just sits there doing nothing ... really wondering why I can't just ftp to it like I always have.
 
apparently Putty uses PSCP not SCP. try that. Just going but what they have on their cite

EDIT: from a putty tutorial

To receive (a) file(s) from a remote server:

pscp [options] [user@]host:source target

So to copy the file /etc/hosts from the server example.com as user fred to the file c:\temp\example-hosts.txt, you would type:

pscp [email protected]:/etc/hosts c:\temp\example-hosts.txt

which appears that I was right about the C and the c drives although I was wrong about the \ being a special character
 
just typing pscp in gives unknown command ... well ... I give up for now. Gonna just take my thumb drive with me so I can take my work off campus. Dunno why they can't just make their VPN crap work with 64bit OS so I could just map the network drive directly and bypass the linux servers, because they obviously got rid fo the option to ftp into it.
 
So I decided to throw in my Ubuntu 8.10 disc, opened up the Live CD, ssh'd into the server, mounted the n-drive, then under Places, logged into the network drive and dragged and dropped the files onto a thumbdrive. w00t! Not easy, but maybe I'll be reinstalling linux on another hdd then.
 
why not just download winscp and use it on your windows machine? you can then connect just like a ftp client and download files from the linux box.
 
I did that. In first post I mentioned that. The problem is I am unable to connect with FileZilla or WinSCP. I need to use putty to get into the linux server and mount the Novell n-drive using the mount-n linux command then access it via ftp. That's the point of using putty. Whenever I try using ftp it just says connection refused. I installed Mint 7 last night and just connected to the network and used the terminal to mount the n-drive and it wokrs just like I do on campus. So all is resolved! w00t!
 
if you can connect using putty, you should be able to connect with winscp. they both use ssh (port 22). if you need to map the drive, use putty to do that then use winscp, while still connected. that is definitely strange that winscp won't connect...
 
I know. I was reading online that servers can block connections like that? I contacted the helpdesk through the university and they say they haven't changed anything, but of course my hardware/software is all unsupported so they won't do jack.
 
you could have 2 live connections, one in putty to mount the drive, then a 2nd in winscp/filezilla to do the transfers. there's no reason that wouldn't work, as both connect thru the same port: if one can connect so can the other.
 
you could have 2 live connections, one in putty to mount the drive, then a 2nd in winscp/filezilla to do the transfers. there's no reason that wouldn't work, as both connect thru the same port: if one can connect so can the other.

That's what I've done. Did it in Fall 2008 and Spring 2009 semesters and out of nowhere it doesn't work anymore. All the settings are the same. They must have done something.
 
Back