I am currently connected to a windows server. I installed winscp on it. I run the winscp and connect to a linux server. Now on the GUI of the winscp, i clicked the console, and use the scp command. The file on the remote server is C:\xampp\htdocs\android\files\file.txt now I want to transfer it to my linux server. I'm planning to automate this using an application created in python. But the problem is my code is incorrect. To be honest I don't really get it. So please guide me.

Here is what I'm trying to do:

scp C:\xampp\htdocs\android\files\file.txt remote_server_ip_add@linux_ip_add:/home

I don't know if this is correct. It's just not working.

The user name of the remote server for example is remote_server. And the user name of the linux server for example is linux_server.

Should it be like this?

scp C:\xampp\htdocs\android\files\file.txt remote_server@linux_server:/home

I also got this error:

C: node name or service name not known
  • Btw, to me it looks like that the fact the Windows 8 server is "remote" is bit irrelevant to the topic (how are you "connected"? RDP?), you are just making your question confusing. Commented Dec 11, 2013 at 7:43

2 Answers 2


If you refer to the Console window of WinSCP, you need to realize that the command executes on the remote server. While your scp syntax might work, if you had executed the command on a local machine (had you have the scp command there).

What do you want to achieve? Why are you trying to transfer file using command line, if you are in a GUI client?

Were you just testing, so that you can use the command for automation? Note that WinSCP has the put command to upload files. But you cannot issue scripting commands in GUI, you need to do it in a scripting mode. For more details see the Guide to automate file transfers to FTP server or SFTP server.

  • yes you're right im going to use the command for automation sir, sorry i can't upvote you because of lack of reputation.
    – Vincent
    Commented Dec 13, 2013 at 1:54

It should be user_name@server_ip:filename. (Run scp without arguments to see info)

scp C:\xampp\htdocs\android\files\file.txt linux_Server@linux_ip_add:/home

BTW: Names are case sensitive - so linux_Server is not the same as linux_server , etc.

You must log in to answer this question.

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