Home arrow Miscellaneous arrow Page 3 - Putty File Transfer Commands in SSH Pr...

Putty File Transfer Commands in SSH Protocol
By: Codex-M
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4

    Table of Contents:
  • Putty File Transfer Commands in SSH Protocol
  • Browsing web server files using Putty
  • Uploading and downloading files using the Putty Secure Copy Client
  • Transferring multiple files in one SSH command



    Putty File Transfer Commands in SSH Protocol - Uploading and downloading files using the Putty Secure Copy Client

    (Page 3 of 4 )

    Now that you know the basic manipulation commands for navigating web server files using Putty, you can easily upload and download files.

    Another Putty client (called as “PSCP”- Putty Secure Copy) will be used for uploading and downloading files. Follow the steps below:

    Step 1: Download PSCP client

    Step 2: Create a folder in your Windows drive C root directory named ssh.

    Step 3: Copy and paste pscp.exe into this folder. The Windows path of this executable file should be (after folder creation and moving pscp.exe to the ssh folder):


    Step 4: To prepare yourself for a file transferring session, open your Windows DOS prompt and type the following commands: cd ssh

    After typing it, your DOS prompt should change to this path: C:ssh>

    Step 5: To download one file (for example, your “robots.txt” stored in the website root directory) from your server to your Windows local computer (e.g. download folder in Drive C, which you decided to create):

    Putty command line example:

    C:ssh>pscp -P 22 codexm@php-developer.org:html/robots.txt c:downloads

    codexm@php-developer.org's password:

    robots.txt | 1 kB | 1.1 kB/s | ETA: 00:00:00 | 100%


    You can decide to use any Windows folder for where you need to download your files. “-P 22" means you connect to Port 22, which is the default SSH port. Html/robots.txt is the path where the file is located. This is where browsing/file navigation techniques using SSH (discussed previously) will help you to know the file location/path.

    Step 6: To upload one file (e.g testfile.txt) to your website's root directory from your Windows local computer (e.g. located in C:uploads):

    Putty command line example:

    C:ssh>pscp -P 22 c:uploadstestfile.txt codexm@php-developer.org:html/

    codexm@php-developer.org's password:

    testfile.txt | 0 kB | 0.0 kB/s | ETA: 00:00:00 | 100%


    The root directory is signified by the path: html/

    SSH sessions using pscp will be automatically closed after completing the transfer.

    More Miscellaneous Articles
    More By Codex-M

    blog comments powered by Disqus


    - Attention: Forum and Site Maintenance
    - Oracle Database XE: Indexes and Sequences
    - Modifying Tables in Oracle Database XE
    - Oracle Database XE: Tables and Constraints
    - More on Oracle Databases and Datatypes
    - Oracle Database XE Datatypes: Datetime and L...
    - Oracle Database XE Datatypes: Character and ...
    - From Databases to Datatypes
    - Firefox 3.6.6 Released with Improved Plug-in...
    - Attention Bloggers: WordPress 3.0 Now Releas...
    - Reflection in PHP 5
    - Inheritance and Other Advanced OOP Features
    - Advanced OOP Features
    - Linux from Scratch V.6.6 Review
    - Linux Gaining in Strength

    Developer Shed Affiliates


    © 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap