[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2040
  • Last Modified:

copying via SSH using Cygwin

Syntax for command line to copy a directory from a RED HAT server which I have SSH access too.

I have Cygwin installed on a Windows pc and want to copy a directory from a linux pc via SSH to the local windows D drive. can anyone help with the syntax required
0
TokenHash
Asked:
TokenHash
  • 3
  • 3
1 Solution
 
Kerem ERSOYPresidentCommented:
Hi,

you need some extra appication to copy a directory. One way is to use rsh such as:
rsync -ave ssh  server_adr:/path/to/dir /destination/path

This will connect to your linux system from cygwin system using ssh and copy the directory. It requires your cygwin has the rsh installed. If not please check with your CygWin installer.

Another method is to use a scp client with a gui such as WinSCP. But WinSCP has nothing to do with CygWin. WinSCP is an open-source freewhere Windows application. When connected to a system it displays a Norton Commander like screen showing local and remote systems then you can select the folder from the source system and use drag-and-drop to the destination system.

check here for WinSCP:
http://www.winscp.org
0
 
TintinCommented:
The scp syntax for cygwin is identical to using scp on any other Linux or Unix system.

cd D:
scp user@redhat.server:/path/to/file .
0
 
Kerem ERSOYPresidentCommented:
Tintin:
> The scp syntax for cygwin is identical to using scp on any other Linux or Unix system.
...
> scp user@redhat.server:/path/to/file .

If you read the original question clearly. He wants to copy "directories" not "files". This is not I've succested command line scp.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
TintinCommented:
OK.

scp -r user@redhat.server:/path/to/dir .
0
 
Kerem ERSOYPresidentCommented:
TinTin: Recusrive copying with scp cause problems with scp. This is why I suggested rsync and WinSCP instead.
Thanks
0
 
TintinCommented:
What type of problems?  I've never encountered any problems using cygwin scp to a Unix/Linux box.
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now