How to Easily Transfer Files/Folder
Between Your
USNA UNIX Account and Your
Local Machine
By
Updated 12JAN05
Introduction: There are several programs that can facilitate the
secure transfer of files between your UNIX account and your local machine. Below are the directions for three such
programs: 1) WinSCP (recommended) 2) WS_FTP Pro (also good, but not free) and 3) PSFTP (command-line interface;
tougher to use).
Enjoy -- and make frequent backups of your work!
WinSCP: (recommended)
Overview: full-featured file transfer software
(good for maintaining a website too; lots of features to grow into as you
become more advanced [permissions, etc.])
It is easy to use and free.
Where to get it:
Information Page
– Direct
Download
How to Set it
Up:
1. Install the program with the defaults except on the
‘User Interface Style’ page. Check ‘Show
advanced login options’.
2. Open WinSCP (the options dialog should automatically popup)
3. In the ‘Session’ category, enter your hostname
(xxx.cs.usna.edu), username (m07xxxx) and set the protocol to ‘SFTP’.
4. In the ‘Environment’à ‘Directories’ category, check ‘Remember last used
directory’ and uncheck ‘Cache visited remote directories’. Also, set the default directory you want it
to startup in locally (‘Local Directory’ box).
5. Press the ‘Save’ button so you don’t have to configure
this again! The save name can be
anything you like.
6. Once you’ve saved, it will change to the ‘Stored
Sessions’ window automatically. Click
‘Shell Icon’ (right-side of the window) and choose ‘Desktop Icon’ (makes it
easy to startup; you can move the icon somewhere more reasonable, like your
start menu). All done – just press
‘Login’!
Note: To
transfer files/folders, simply drag and drop.
Setting Up WinSCP:

WinSCP running and logged in to my UNIX account:

WS_FTP PRO:
Overview: full-featured file transfer software
(good for maintaining a website too; lots of features to grow into as you
become more advanced [permissions, etc.])
Where to get it:
Information Page
– Buy It Page
(Government Discount Page)
Note: The free WS FTP version which is on our computers and can be
downloaded will not be sufficient. It is
unable to connect through a secure SSH connection and so it cannot be used to
connect to our UNIX labs.
How to Set it
Up:
1.
Open the 'Organize Sites' window (under 'Options --> Organize Sites')
2.
Click 'Create Site'
3.
Name your site 'USNA UNIX LAB' or something like that and press 'Next'.
4.
Host address is 'xxxxx.cs.usna.edu' (use the one you looked up for PuTTY) and
press 'Next.
5.
Type in your User ID (m07xxxx) and uncheck 'Save Password' and uncheck 'Save
Account' and press 'Next'.
6.
Change 'Server Type' to 'SFTP/SSH' and then make sure 'Port' is set to
'22'. Press 'Finish'!
Now,
in the 'Organize Sites' window, the one you just added should be there. Just double click it to connect whenever you
open WS_FTP Pro! On the left side of the
screen will be your computer, on the right side will be the files on your UNIX
account. Use the little arrows to move
files back and forth.
Extra Options to Set: Go to options and under 'General' set 'Allow files and folders to be
moved' so you can use WS FTP to move folders/files if you want (by right-click
a file/folder and choosing ‘Move’ from the context menu which appears). Also, remember you can check 'Allow deletion
of non-empty folders' if you ever need to delete a folder and all its files
(disabled by default so you don't accidentally nuke all of your stuff, I
suppose).
Installation (setting the ‘Server Type’):

The ‘Organize Sites’ Window:

WS_FTP Pro running and logged in to my UNIX account:

PSFTP:
Overview: this is a command-line file transfer
program; it is offered by PuTTY’s distributors.
It is noticeably less robust and user-friendly than WS FTP Pro, but it
is free and does allow you to transfer files fairly easily.
Where to get it:
Information
Page – Download
(Free)
Note: you may also want to download the newest PuTTY release (0.56); the
old version has some security issues.
The current PuTTY release can be downloaded from the above information
page or directly here.
How to Set it
Up:
1. Open
psftp.exe
2. Open
a connection with the 'open' command followed by your hostname (open
xxx.cs.usna.edu; same as the server you entered on PuTTY)
3. Enter
your username and password when prompted
Optional: to
have psftp automatically connect to your server (ie allowing you to skip the
‘open’ command) create a shortcut to psftp.exe and right-click it, choose
‘Properties’ add to the ‘Target’ field (after the end quote) the name of the
server
Basic
Commands:
·
Remote commands: cd,
ls, rm, exit (work just like UNIX command line...shows system files too)
·
Local commands:
lcd (change local dir, works like cd), lpwd (show current local dir)
·
File Transfer
commands: get, put (downloads/uploads the specified file)
·
Type /help to see the full list of commands!!
PSFTP running, logging into my UNIX account, and
performing a few operations (change remote dir, list remote dir, show local
dir, and get [download] a remote file:
