Miscellaneous

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

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
    2009-12-30

    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

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    Putty File Transfer Commands in SSH Protocol - Browsing web server files using Putty


    (Page 2 of 4 )

    Once SSH is enabled, you can start using Putty for any SSH connection to your server. One of the things you need to know when transferring files using a command line (as opposed to using GUI FTP client) is the file path. This can be discovered by browsing web server files and executing SSH commands to tell you the path.

    The SSH/secure shell commands are based on the Linux and UNIX environments,  and with the use of the Putty SSH client, you communicate with an SSH server and issue secure shell commands in a Windows working environment.

    Step 1: Download the Putty SSH client to your Windows desktop. 

    Step 2: Double click the application icon and choose to run it.

    Step 3: Under “Host name (or IP address)” enter the IP address of your web server.

    Step 4: Under “Port,” enter 22.

    Step 5: Under connection type, check “SSH.” Leave the others at the default settings.

    Step 6: Click “Open.”

    Step 7: If a certificate security warning pops up, click “yes.”

    Step 8: Under “Login as:” enter your FTP username, and then, after you enter it, enter the password as well. For security reasons, you will not see the password as you type, so make sure to type it carefully.

    Putty command line example:

    login as: codexm

    codexm@82.197.130.134's password:

    Step 9: If no errors are shown, you have successfully connected to your website/SSH server using Putty. To learn the name of the existing directory after logging in, enter this command: pwd

    Putty command line example:

    [codexm@p424545ds ~]$ pwd

    /home/codexm

    Step 10: To know the list of files under the directory you are currently browsing, enter: ls

    Note: The directory you are currently logged into may not be the website's public HTML root directory, for example under this list of directory files/folders:

    Putty command line example:

    [codexm@p424545ds ~]$ ls

    data htconfig html

    Website files are actually saved and stored in an HTML folder.

    Step 11: Now to browse the files under the HTML folder, use the cd command and then type the ls command again:

    Putty command line example:

    [codexm@p424545ds ~]$ cd html

    [codexm@p424545ds html]$ ls

    (It then shows a long list of your website files and folder stored in the public HTML root directory; a sample list is shown below)

    wp-admin

    wp-app.php

    wp-atom.php

    wp-blog-header.php

    wp-comments-post.php

    wp-commentsrss2.php

    wp-config.php

    wp-content

    wp-cron.php

    wp-feed.php

    In addition, you CANNOT see the server configuration files like .htaccess by using the ls command. In this case you will use the ls –a command:

    Putty command line example:

    [codexm@p424545ds html]$ ls -a

    .hcc.thumbs

    .htaccess

    An example list of configuration related files shown above.

    Step 12: If you would like to browse the content of the wp-content folder, simply enter:

    Putty command line example:

    [codexm@p424545ds html]$ cd wp-content

    [codexm@p424545ds wp-content]$

    Step 13: If you would like to go up one level higher, this means going back to the root directory. Enter the cd .. command

    Putty command line example:

    [codexm@p424545ds wp-content]$ cd ..

    [codexm@p424545ds html]$

    More Miscellaneous Articles
    More By Codex-M

    blog comments powered by Disqus

    MISCELLANEOUS ARTICLES

    - 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
    - Install Slackware on Your Old PC


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