| | |||||||
| |||||||
| |||||||
|
|
|
|
|
|
|
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): C:sshpscp.exe 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% C:ssh> 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% C:ssh> The root directory is signified by the path: html/ SSH sessions using pscp will be automatically closed after completing the transfer. More Miscellaneous Articles |
| |
| |