scp comand in Linux/windows

copernic2006
Forum User
Forum User
Posts: 86
Joined: Wed Oct 03, 2012 2:51 pm
Location: Algiers

scp comand in Linux/windows

Unread post 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?
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4149
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: scp comand in Linux/windows

Unread post 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?
copernic2006
Forum User
Forum User
Posts: 86
Joined: Wed Oct 03, 2012 2:51 pm
Location: Algiers

Re: scp comand in Linux/windows

Unread post 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.
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: scp comand in Linux/windows

Unread post 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?
Lemonbit Internet Dedicated Server Management
copernic2006
Forum User
Forum User
Posts: 86
Joined: Wed Oct 03, 2012 2:51 pm
Location: Algiers

Re: scp comand in Linux/windows

Unread post 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 :)
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: scp comand in Linux/windows

Unread post 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?
Lemonbit Internet Dedicated Server Management
User avatar
mikeshinn
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 4149
Joined: Thu Feb 07, 2008 7:49 pm
Location: Chantilly, VA

Re: scp comand in Linux/windows

Unread post 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.
Post Reply