How would I copy somefile.zip to another directory?

3 Answers 3


If you are connected to a shell session via ssh, and the file exists on the remote system, you can use the cp command.

cp sourcefile destfile

If the file exists on the local system you should use sftp. If your local machine runs Windows, WinSCP is an excellent sftp client.

  • why would you use sftp when you have scp, which goes over SSH so it doesn't require any extra software or ports?
    – rmeador
    Oct 21, 2009 at 19:46
  • The original poster didn't say they had scp. Assuming they don't have it, WinSCP is much easier. Furthemore, sftp uses the same port as ssh.
    – G-Wiz
    Oct 21, 2009 at 20:15

Assuming you're using the command line then like this

scp myfile.txt dest/

for a local file or alternatively

scp user@myserver:/path/to/myfile.txt user@myserver:/path/to/dest/


If you are using Win32, Tunnellier is a reasonable solution which not only allows file transfer, but secure remote access as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy