Page 1 of 1

scp comand in Linux/windows

Posted: Mon Mar 04, 2013 5:43 pm
by copernic2006
Hello
I need to transfer (remote copy) a file from a client PC to the server (the pc is running Windows seven).
How to start the copy command (from the server) using scp (or another command)?
Can you help me please?

Re: scp comand in Linux/windows

Posted: Mon Mar 04, 2013 7:59 pm
by mikeshinn
OK, so do you want to copy the file from the Windows PC to the Linux Sever?

If so, Do you have an SCP or SFTP client installed on the Windows machine? And if so, which one?

Re: scp comand in Linux/windows

Posted: Mon Mar 04, 2013 8:12 pm
by copernic2006
Hello Mike,
Thank you clean your help.
Yes, I plan to install Cygwin on the PC (which I will activate an ssh client.
Just to clarify, I would run the command transfer from the server.

Re: scp comand in Linux/windows

Posted: Mon Mar 04, 2013 8:18 pm
by prupert
Most "FTP clients" also support SFTP (the SSH file transfer protocol) out of the box. Regardless of whether cygwin might be useful to you, you don't need it to simply transfer a file over SSH.

The other thing: what do you mean by "I would run the command transfer from the server"? If you mean that you want to connect from the Linux server to your Windows computer as in initiating the copy transfer at the server, that can potentially involve a lot of hassle. Why not simply transferring it from the server using an SFTP/SCP client on your computer?

Re: scp comand in Linux/windows

Posted: Mon Mar 04, 2013 8:27 pm
by copernic2006
In a normal case, a ftp client is more than enough, but I only have remote access to pc.
What I want is for my server, I connect to remote pc and retrieved the folder containing the site of one of my clients.

I know, I'm complicated life, but unfortunately, I have no choice in this case :)

Re: scp comand in Linux/windows

Posted: Mon Mar 04, 2013 8:31 pm
by prupert
copernic2006 wrote:In a normal case, a ftp client is more than enough, but I only have remote access to pc.
What I want is for my server, I connect to remote pc and retrieved the folder containing the site of one of my clients.

I know, I'm complicated life, but unfortunately, I have no choice in this case :)
So in that case, you want the Windows PC to act as a server. That will certainly involve more hassle than firing up an SFTP client. I am not at all that fluent in Windows servers so perhaps somebody else will be able to give you some advice on this. However, first thing that comes to my mind is that it couldn't hurt to look at a less invasive option. It seems an odd choice to set up the Windows PC as a server *because* you have limited access to it. If you were able to set up something like that, why not use an SFTP or FTP client on the Windows PC after all?

Re: scp comand in Linux/windows

Posted: Mon Mar 04, 2013 8:40 pm
by mikeshinn
Windows does not support SSH/SCP/SFTP natively, so to use the SSH protocol to access a Windows server you will need to setup an SSH server on the Windows computer. Or you'll need to use another protocol to access it. Is the Windows server on the same LAN as the Linux server? If so, you could use smbclient to access a Windows share.

If you really want to stand up an sshd server on Windows, you could try using the sshd daemon in cygwin. You'll need to also open a hole in the windows 7 firewall to do this. What might be easier would be to use freesshd:

http://www.freesshd.com/?ctt=download

I havent used it myself, and I know its had some vulnerabilities in the past:

http://www.cvedetails.com/vulnerability ... esshd.html

So YMMV.