-   Linux - Newbie (
-   -   SCP to copy files using putty (

JJJCR 09-01-2011 09:09 PM

SCP to copy files using putty
hi, i tried to use scp to copy files from my centos box to my win xp machine but there's an error.
Name or service not known.

I'm using putty to connect to my centos box.

Here's the command i used:

scp -r root@ c:\testing\iptables.txt

any help is greatly appreciated, thanks.

andrewthomas 09-01-2011 09:29 PM


-r Recursively copy entire directories.
Why are you using -r with a file?

JJJCR 09-01-2011 10:08 PM

hi andrewthomas, but i tried using this command:
scp root@ c:\testing\iptables.txt

i still have error: Name or service not known

sorry about this just starting to learn linux. ;)

any ideas? thanks.

chrism01 09-01-2011 11:34 PM

If you are logged into your Centos box and running the cmd there, its saying there is no ssh daemon/service running (listening) on the MS box (possibly also the firewall on the MS box is blocking that cxn on port 22).

OTOH, if you are on the Centos box, you don't need 'root@...' part.

If you are on the MS box, cd to c:\testing and try


scp root@  .
although allowing remote root access is frowned upon for security reasons.
On MS cmd line I usually use pscp, part of Putty

Again, if it says no such service, check sshd is running on Centos and check iptables (firewall)


JJJCR 09-02-2011 03:16 AM

hi chrism01,i'm not able to find the scp program but i downloaded the winscp and open command prompt to the testing directory.

winscp root@

then under winscp shell i type this command:

get /root/Desktop/iptables.txt

when i exit from the winscp shell, the file was copied already to the testing directory.

Thanks, ;)

michaelk 09-02-2011 05:02 AM

FYI you can download a windows version of scp called pscp.

JJJCR 09-05-2011 02:16 AM

Thanks michaelk :)

All times are GMT -5. The time now is 01:10 AM.