r7 - 26 Jul 2005 - 21:46:33 - StefanStrandbergYou are here: TWiki >  CSDocs Web  > RemoteSystemFileTransferHowTo

Transferring Files to a Remote System

Setup

  • This document describes how to transfer files from CSL Unix computers over to remote systems.
  • CSL Windows NT/2000 workstations can NOT be used except by the person physically sitting at the computer. This is not due to CSL policies, but rather the design of the operating system.
  • This document assumes that you have a network connection, such as a dial-up connection through WiscWorld or a ResNet connection.
  • Computers that are available for remote access :
    • route66.cs.wisc.edu: available for scp and secure ftp to all users (intended especially for use by users with only Windows accounts).
    • best-emperor.cs.wisc.edu, best-tux.cs.wisc.edu, best-adelie.cs.wisc.edu, best-humboldt.cs.wisc.edu, best-macaroni.cs.wisc.edu, or best-royal.cs.wisc.edu are designed to select the workstation with the LOWEST load on the CPU. This is for use by users with an instructional Unix account who are connecting remotely
    • emperor01-emperor40.cs.wisc.edu, tux01-tux20.cs.wisc.edu, adelie01-adelie07.cs.wisc.edu, humboldt01-humboldt14.cs.wisc.edu, macaroni01-macaroni19.cs.wisc.edu, and royal01-royal30.cs.wisc.edu are available for ssh (secure remote connection) to users with an instructional Unix account.
    • Any supported Unix computer you have an account on.

scp: A Command-line File Transfer Mechanism

scp is an secure alternative to traditional rcp. It can be used to transfer files to or from any computer running an ssh server (in CS, this is any Unix computer (see the list above).

On UNIX systems:

To transfer files secure from a remote computer:

    % scp <your-login>@route66.cs.wisc.edu:</path/to/remote/file> </local/directory>
Or, to transfer to a remote computer:
    % scp </local/file(s)/to/transfer> <your-login>@route66.cs.wisc.edu:</remote/dir/to/transfer/to>

On Windows systems:

An scp client is included in

ssh.com
's SSH implementation. It is called scp2. Substitute scp2 for scp in the UNIX instructions above.

Note: Users can establish an scp connection with any Unix-based Computer Sciences computer they are authorized to log in to. Simply replace route66.cs.wisc.edu with the appropriate hostname to access a specific Unix host in the department.

sftp: A Secure Alternative To FTP

sftp is an secure alternative to traditional ftp. It can be used to transfer files to or from any computer running an ssh server (in CS, this is any Unix computer (see the list above). This is the simplest way to transfer files to and from Windows systems.

On UNIX systems:

To transfer files via sftp:

    % sftp <host>
(you will then be prompted for your login password)

  • To upload files: put filename
  • To download files: get filename
  • To get a list of commands available: help

Note:Newer versions of gftp (version 2.0.9 and higher) have support for a GUI interface to this file transfer mechanism. As of this writing, that code is still in beta test.

On Windows systems:

There are several sftp clients available for Windows. We recommend using the implementation available from ssh.com. Download information and connection instructsions for this product is available at Using SSH On Windows 95/98/ME And Windows NT/2000 Computers .

For command-line file transfers, use the sftp mechanisms described above, use the sftp2 program distributed with the ssh.com SSH implementation.

To transfer files with the GUI SSH client (from ssh.com):

  1. Connect to the host you want to transfer files from (terminal connection)
  2. Select Window -> New File Transfer. This will bring up a GUI interface for transferring files.
  3. Drag and drop files, as appropriate, to copy files back and forth. Other file operations (rename/move/delete) can be accessed by right-clicking on a particular file or folder.

FTP Via SSH-tunnel: A Way To Make Legacy FTP Clients Work Securely

You MUST use SSH port forwarding if you want to continue to use FTP clients. We recommend using scp or sftp whenever possible.

The only hosts that allow SSH-tunneled FTP connections are route66.cs.wisc.edu and alumni.cs.wisc.edu.

On UNIX systems:

To use port fowarding to establish a secure FTP session to route66.cs.wisc.edu:

    % ssh -L 21:route66.cs.wisc.edu:21 route66.cs.wisc.edu 
    % ftp localhost

This uses port forwarding to establish a secure connection (via SSH) to route66, then establishes an FTP session to it (localhost).

On Windows systems:

Using SSH

  1. Setup a secure connection for route66.cs.wisc.edu. See SSH (secure Shell) for how to set up SSH on your system if you haven't done that already.
  2. In the Connect dialog box, highlight the route66 session you just created, and click on edit.
  3. Select the Connection heading, click on the on the Advanced button
  4. Select the Port Forwarding tab.
  5. To add a new forwarded port, click on New. Fill in the following fields
    Local port: 21
    Remote hostname: route66.cs.wisc.edu
    Remote port: 21 
  1. Click on OK in the Advanced SSH Options dialog, OK in the Session Preferences dialog, and OK in the Connect dialog. This should establish a connection to route66 using port forwarding. If this does not establish a connection, please check your steps and try again.
  2. Next time you log in, you should be able to just select route66 from the Connect menu.
  3. Once the port forwarding has been established, any FTP application can now be used to securely transport files. Given below are examples of how to setup three of the many FTP clients that are available.

Using WS_FTP (comes with WiscWorld) to transfer files:

Start the application. The Session Properties dialog appears. If it does not open, clicking on the Connect button in the main application window will also open it. Fill in the follwing information:

  • On the General tab:
    • Profile name: whatever you want to call the session, for example SecureFTP
    • Host Name/Address: localhost
    • Host Type: Automatic detect
    • User name: your username
    • Password: we recommend you leave this field blank and enter your system password when prompted.
    • Account: leave blank
    • Comment: any additional notes you would like to make about the setup (for your personal reference only).
  • On the Advanced tab, check the Passive tranfers box

Using Mozilla or Netscape to transfer files:

  • In the Location field type in the URL ftp://username@localhost/ where username is your username.
  • Click on the file you want to download from the remote site.
  • To upload files,
    • Navigate to the destination directory
    • Select File -> Upload File
    • Select file(s) to upload
    • Select OK

Due to deficiencies in the SSH protocol, only FTP clients (such as WS_FTP, Mozilla and Netscape) that use the pasV command are supported. FTP clients which use the PORT command (such as FTP from the DOS console, NCFTP or Internet Explorer) will NOT work.

Note:Alumni account users should replace route66 with alumni in these instructions.

ZMODEM Over SecureCRT

SecureCRT, distributed with the WiscWorld suite of software, is capable of transferring files via ZMODEM within a SSH terminal session. For systems that do not have ssh.com's SSH implementation available, this is an effective way of transferring files between computers.

To transfer files with ZMODEM, you must open an SSH connection to a department UNIX computer you have an account on. The instructions below assume you have already done this.

You should also set up a default upload and download directory before you transfer files. To do this:

  • Create the default upload and download directory, if they don't exist already.
  • Under the Options menu, select Session Options
  • Select File Transfer
  • Enter the directory names, or click the browse button(s) to find the directory.
  • Select OK

Uploading files (from your Windows computer to a department UNIX computer):

  • cd (change directory) to the location you want the files uploaded to
  • rz
  • SecureCRT will pop up a file browse menu; select each of the files you want to transfer and click Add
  • Select Close when you are finished selecting files
  • The ZMODEM transfer will transfer files.

Note:All uploaded files will be deposited in the directory where you run rz.

Note:We have had problems with the upload process to Solaris systems. We suggest you use a Linux system for such transfers if you choose this method of file transfer.

Downloading files (from a department UNIX computer to your Windows computer):

  • cd (change directory) to the location you want the files downloaded to
  • sz
  • SecureCRT will pop up a file browse menu; select each of the files you want to transfer and click Add
  • Select Close when you are finished selecting files
  • The ZMODEM transfer will transfer files.

Note:All downloaded files will be deposited in the download directory defined in your SecureCRT session profile.

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r7 < r6 < r5 < r4 < r3 | More topic actions
 
CSL Home
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback