5

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 images.zip. 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?

8 Answers 8

7

You can use winscp.

4
  • 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, 2011 at 3:55
  • you are talking about the scp command. But since you are using a windows client the command is not available. May 14, 2011 at 4:15
  • 3
    @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, 2011 at 4:20
  • @James: i missed out the Cygwin option. See Johan's answer May 16, 2011 at 9:43
6

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.

4

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

2

pscp Is also a possibility (from the putty suite)

2

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

1

Filezilla is also an OSS option.

1

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.

1

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.

You must log in to answer this question.