Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I wasn't sure what to search for, since if I knew the term I would just use it :(

Basically, I am trying to copy over a directory on my computer to one of my university's machines, and I am using the linux command line to do this. Is it just a simple variant of 'cp -r'?

share|improve this question
2  
Hi Dark Templar, general computer usage questions belong on our sister site, Super User: they're not on-topic here. You're looking for scp: How to copy from 1 computer to another computer with Linux shell commands? –  user8 Oct 10 '11 at 4:26
    
When SCP is not available, tar -czf - dirname | ssh login@remotehost "tar -xzf -" –  SF. Oct 10 '11 at 12:42
add comment

closed as off topic by Mark Trapp Oct 10 '11 at 4:25

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers

up vote 4 down vote accepted

I don't believe there is a way to 'pull' the files from your machine (once your ssh'd in - unless your machine can be ssh'd into from the server). Generally, you'd be pushing the files from your machine to the server.

If you're on a *nix based machine, there are a number of ways to do this, the simplest being scp -r my_folder remote_machine:my_folder. If you're on windows, you should be able to use winscp

share|improve this answer
    
Thanks, Adam. Is this the same as the ftp method described in the answer as well? –  Dark Templar Oct 10 '11 at 4:08
    
@DarkTemplar, no... scp is simply file transfer over ssh. FTP is a different protocol altogether. Since you can ssh into the server, you should be able to scp files to it. But in order to ftp files, the server needs to have an ftp server running. –  Adam Wagner Oct 10 '11 at 4:12
    
"scp" allows you to copy to or from a remote machine. You need to read the man pages to get the hang of the syntax. Somthing like "userid@remote/mydir/myfile" will reference file myfile in directory mydir at mchine "remote" using "userid"s credentials. –  James Anderson Oct 10 '11 at 4:12
    
@JamesAnderson, I know... I just wasn't sure if the OP would have ssh access into their own machine from the server, that is why I phrased the answer the way I did. –  Adam Wagner Oct 10 '11 at 4:14
add comment

On a unix command line you can try using sftp which acts like an client FTP but over ssh.

share|improve this answer
add comment

You'd use File Transfer Protocol. There are various clients out there that offer additional support as well as GUIs and so on.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.