Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Newbie here, I just got SSH access to my shared hosting server (unix). I am current in a directory on the server where there is a file called I want to download this to my desktop (I am running windows locally if that matters). Which command do I need and what is the syntax?

share|improve this question

migrated from May 14 '11 at 3:57

This question came from our site for system and network administrators.

You can use winscp.

share|improve this answer
Is there no built in command to do this, for example to copy a file I would do cp file.html file_copy.html. Is there no such default way of doing a download in Unix? It just seems like such a common task. – James May 14 '11 at 3:55
you are talking about the scp command. But since you are using a windows client the command is not available. – Software Mechanic May 14 '11 at 4:15
@James, for some reason, the ability to ssh to a server or scp a file is consistently missing from each version of Windows. – Xenoactive May 14 '11 at 4:20
@James: i missed out the Cygwin option. See Johan's answer – Software Mechanic May 16 '11 at 9:43

For completeness, if you're on a Mac or Linux, you can simply open up a terminal and execute sftp <uname>@<host>. And then either cd to the path or execute a get <path> command to download the file.

There's also SCP you could use to directly download the file.

share|improve this answer

Grab a copy of WinSCP; it's free/open source SFTP (and other protocols) client.

share|improve this answer

pscp Is also a possibility (from the putty suite)

share|improve this answer

Strange,No-one mentioned PSFTP

type help for a list of commands,

what i would typically do is to

lcd(change local directory)

lpwd(local present working directory)

cd PATHNAME(to the destination directory)

get FILENAME (will download the FILENAME)

dats about that

share|improve this answer

Filezilla is also an OSS option.

share|improve this answer

Since you are on windows, install something like cygwin so you get a bash terminal to work in.

Then you can use scp in the same was as on your unix server.

share|improve this answer

If you want to do the copy from your remote server, you need to set up some kind of server on your desktop to be able to push the file.

If you want to pull it from your desk many possibilities are offered to you :

  • WinScp: provides a GUI for directories browsing and copy over ssh (scp copy)
  • pscp: Provided on the PuTTY site, it gives you a command line interface (usable with cmd.exe provided you've set up the PATH environment variable)

If you want other tools, you can find in other answers :

  • FileZilla: has a GUI to use SFTP
  • Psftp: equivalent of pscp (command line) for the SFTP protocol.
share|improve this answer

You must log in to answer this question.