Copy file from remote UNIX terminal to local system

0

1

I use putty on Vista to connect to remote UNIX shell. But I want to copy files from that remote server to my local Vista system. How to do that??

pineapple

Posted 2009-10-11T03:22:56.130

Reputation: 1 724

Answers

6

WinSCP should do the trick. You're not going to be able to do it form putty.

ABentSpoon

Posted 2009-10-11T03:22:56.130

Reputation:

3

Use PSCP; PuTTY Secure Copy. If you can connect via SSH there is PuTTY and then 99 times out of 100 if you can SSH you can also SCP(Secure Copy).

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

sanscore

Posted 2009-10-11T03:22:56.130

Reputation: 131

3

If you're using PuTTY and connecting via SSH check if you have pscp installed with PuTTY (or download it from the PuTTY site). Then you can just do:

pscp user@host:/path/to/file .

Muttley

Posted 2009-10-11T03:22:56.130

Reputation: 215

2

I know it's been a while since this was asked, but I just happened to pull this off fairly easily with a couple utilities without an extra SCP/SFTP session.

  • Set up port forwarding in your SSH session for some remote port portA to forward to some local port portB.
  • Run netcat (or an equivalent such as ncat) on your local machine, making it listen to portB and output to a file:

    nc -l -p portB > output_file
    
  • Run netcat (or, again, an equivalent such as ncat) on the remote host, piping in data however you wish to localhost:portA.

    nc localhost portA -q 1 < my_file
    # or maybe, say, mysqldump --xml ... ... | nc localhost portA -q 1
    
  • The netcats will both exit when the file has been completely received.

You can of course add a gzip or a pv inbetween. Do remember the connection only accepts one file at a time -- creative use of tar might help.

AKX

Posted 2009-10-11T03:22:56.130

Reputation: 323

0

Cygwin + scp/ftp?

delete

Posted 2009-10-11T03:22:56.130

Reputation:

0

PuTTY comes with a program called PSFTP, which is the PuTTY equivalent of SFTP. This is superior to any of the scp-based solutions.

Chris Jester-Young

Posted 2009-10-11T03:22:56.130

Reputation: 2 116