0

I have ssh root access at a server and I need to download, then upload a file to it.

I use putty on my local machine, connect and can do anything. But I don't know how to download the file :). I know that a way would be to set a ftp account but I don't want to do that just for a file.

1
  • The Putty suite includes psftp, an FTP over SSH client.
    – Chris S
    Commented Apr 20, 2011 at 20:50

3 Answers 3

13

You can use SSH to send and receive files. This is referred to as SFTP. You just need to download an SFTP client, and you would then use the same connection credentials you use for SSH. A good one is WinSCP.

1
  • 1
    Just a quick comment - SFTP and SCP are two different ways to copy files using SSH. SCP requires no explicit server support, but SFTP requires a sftp binary or built-in support on the daemon. Commented Apr 20, 2011 at 12:19
3

I do this using scp.

To copy the file "foobar.txt" from the remote host to local machine:

$ scp [email protected]:foobar.txt /some/local/directory

To copy the file "foobar.txt" from the local machine to the remote host:

$ scp foobar.txt [email protected]:/some/remote/directory

Since you're using PuTTy (I assume from Windows), there is an included scp utility with similar syntax (pscp.exe). From a command prompt, cd to C:\Program Files\PuTTY and run:

pscp foobar.txt [email protected]:/some/remote/directory
1

WinSCP for Windows perhaps? Or as previous poster said scp/pscp.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .