Windows Perspective – Linux File Transfer Using Secure Copy Protocol

Background

In this post wanted to go over some of the options available to transfer files between two hosts.  One running Windows and the other running Linux.

For this post we will assume that our working computer is Windows.

Technology

Secure Copy Protocol ( SCP )

Wikipedia

Link

Secure copy protocol (SCP) is a means of securely transferring computer files between a local host and a remote host or between two remote hosts. It is based on the Secure Shell (SSH) protocol. “SCP” commonly refers to both the Secure Copy Protocol and the program itself.

The SCP is a network protocol, based on the BSD RCP protocol, which supports file transfers between hosts on a network. SCP uses Secure Shell (SSH) for data transfer and uses the same mechanisms for authentication, thereby ensuring the authenticity and confidentiality of the data in transit. A client can send (upload) files to a server, optionally including their basic attributes (permissions, timestamps). Clients can also request files or directories from a server (download). SCP runs over TCP port 22 by default.

Options

  1. Command Line
    • pscp
  2. GUI
    • winscp

Practice

pscp

Developer

pscp is developed and maintained by the Putty’s team.  Originating developer is Simon Tatham.

Download

pscp is available here.

Installation

No installation; a lone binary.

Usage

Browse Remote File System

Syntax

pscp -ls login@[remote-host]:[remote-folder]
Usage
pscp -ls root@hrdb-dev:/app/microsoft/sqlServer/backup/hrdb

Output

pscp.ls.20181203.0852AM

Copy

Receive a File
Syntax

pscp login@host:/[remote-folder] [local-directory]

Usage

pscp -r root@hrdb-dev:/app/microsoft/sqlServer/backup/hrdbdev01 c:\Microsoft\SQLServer\Backup

Output

pscp.receive.20181203.0910AM.PNG

Explanation
  1. Copying file

 

Send a File
Syntax

pscp [local-directory] login@host:/[remote-folder] 

Usage

pscp C:\Microsoft\SQLServer\Backup\blog.bak root@hrdbdev01:/app/microsoft/sqlServer/backup/hrdbdev01

Output

pscp.send.20181203.0941AM

Explanation
  1. File Sent

 

winscp

Developer

Martin Přikryl the developer of winscp.

Download

winscp is available here.

I prefer the Portable version and that is available here.

Installation

For the portable version, no install necessary just download and invoke.

Usage

Configuration

Site Manager

Please access site configuration through following the menu option Session\Site\Site Manager.

winscp.configure.20181203.1009AM.PNG

Session

winscp.use.backup.20181203.1013AM

Referenced Work

  1. SSH.COM
    • Home > SSH > PuTTY > putty-manuals > PuTTY User Manual (putty-0.68-manual)
      • Chapter 5: Using PSCP to transfer files securely
        Link

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s