Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
The Putty suite includes psftp, an FTP over SSH client. –  Chris S Apr 20 '11 at 20:50
add comment

3 Answers

up vote 11 down vote accepted

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.

share|improve this answer
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. –  Eduardo Ivanec Apr 20 '11 at 12:19
add comment

I do this using scp.

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

$ scp your_username@remotehost.com:foobar.txt /some/local/directory

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

$ scp foobar.txt your_username@remotehost.com:/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 your_username@remotehost.com:/some/remote/directory
share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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