vote up 0 vote down star

Hi all,

I have connected to a unix server using ssh from my terminal. But i am having a windows client.

How to copy files from the unix server to the windows client.

Can i use the scp and rcp commands ?

Or is there any other way to do so ?

Thanks

flag
I think it belongs to superuser.com – RageZ Nov 16 at 3:47
3  
congrats on the baby windows client! – Dan McG Nov 16 at 3:48
@Dan: ?????? I didn't got it. – RageZ Nov 16 at 3:52
4  
"But i am having a windows client" as in "But i am having a baby". Crikey, humor shouldn't need to be explained :-) – paxdiablo Nov 16 at 3:54
@pax & dan: sorry arf that's a good joke! but I am not native English speaker so kind of difficult to get that kind of joke! – RageZ Nov 16 at 3:56
show 4 more comments

migrated from stackoverflow.com

4 Answers

vote up 9 vote down

scp is the way that we do this. If you're using something like putty, it comes with pscp as part of it.

I prefer pscp over the standard scp since it allows you to specify a password on the command line, something useful for scripting.

An example invocation from one of my scripts (details changed to protect the innocent):

pscp -pw paxpwd src.tar.gz pax@pax.com:/usr/pax/tmp/src.tar.gz

This copies the src.tar.gz file from my local (Windows) directory to /usr/pax/tmp on my pax.com UNIX machine, using the pax/paxpwd user and password.

Your particular use case would be satisfied by:

pscp -pw biranchipwd biranchi@myunixserver.com:abc/xyz.txt xyz.txt

Keep in mind that placing passwords into scripts is not generally a good idea since it means anyone that breaks into your local machine can easily break into the other machine as well.

link|flag
i accept your answer, can u please write the syntax for it. Say i have a file xyz.txt in my unix server under abc folder.I want to copy it to my windows desktop. – Biranchi Nov 16 at 3:56
@biranchi: you do the reverse from your windows machice get/put whatever file. It won't be possible to copy from your unix box, since your windows box doesn't have a ssh server. – RageZ Nov 16 at 3:58
@Biranchi, see the update for a sample command on the Windows side. @RageZ, if you install Cygwin, there's an ssh deomon that you can run but I'd still suggest just using the client on Windows and server on UNIX. – paxdiablo Nov 16 at 4:12
@pax; you are right you can run sshd on windows but more easy to use the unix server since it's already there ^^ – RageZ Nov 16 at 4:15
@RageZ: I am using putty to ssh to my unix server. – Biranchi Nov 16 at 4:17
vote up 1 vote down

you should check SFTP. Filezilla is able to handle SFTP session. also putty provide a pscp command.

link|flag
There ya go, @RageZ. +1, sharin' the love around. – paxdiablo Nov 16 at 4:13
@pax: thanks! ^^ – RageZ Nov 16 at 4:15
vote up 0 vote down

You can use scp directly on the command prompt itself: For example:

c:>scp myuser@myhost.com:/home/myuser/test.properties .

myuser@myhost.com's password:

test.properties 100% 675 0.7KB/s 00:00

link|flag
@techzen: did you read his question ? last time I checked there was no scp command on the windows distro ... – RageZ Nov 16 at 3:55
Eek! And s?he's writing to the root of the C: drive. Where you shouldn't even have write permissions, usually. That'd be, like, telling UNIX users to download files somewhere to / – Johannes Rössel Nov 16 at 6:35
vote up 0 vote down

Check out WinSCP for a free GUI SFTP client if you don't want to bother with the command line.

link|flag

Your Answer

Get an OpenID
or
never shown

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