Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question
    
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. –  Martin Prikryl Dec 11 '13 at 7:43

2 Answers 2

up vote 0 down vote accepted

If you refer to 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 local machine (had you have scp command there).

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

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

share|improve this answer
    
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 Dec 13 '13 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.

share|improve this answer

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.