Skip to content

SFTP Services


SFTP Access Guide

This guide provides instructions on connecting to CS department SFTP servers using popular clients like WinSCP and MobaXterm on Windows, as well as command-line alternatives for Linux users. SFTP (Secure File Transfer Protocol) allows you to securely transfer files to and from remote servers.


Connecting to SFTP

Connecting with WinSCP (Windows)

WinSCP is a popular free SFTP client for Windows.

Installation

  1. Download the latest version of WinSCP from the official website.
  2. Run the installer and follow the on-screen prompts to complete the setup. Default installation options are usually fine.

Configuration and Usage

  1. Open WinSCP.
  2. If the "Login" dialog doesn't appear automatically, click on "New Session".
  3. Enter the following details in the session configuration:

    • File protocol: SFTP
    • Host name: <your_cs_username>@<sftp_server_address>
    • Port number: 22 (this is the default for SFTP and usually auto-fills)
    • User name: <your_cs_username> (this might auto-fill from the Host name)

    Understanding Hostname and Username

    • Replace <your_cs_username> with your actual CS student/faculty username (e.g., jdoe123).
    • Replace <sftp_server_address> with the URL or IP address of the specific CS server you need to connect to (e.g., linux.cs.odu.edu, webhost.cs.odu.edu).
  4. You can click "Save" to store these session details for future use (recommended). Give the session a descriptive name.

  5. Click "Login" to connect. You may be prompted to accept the server's host key on the first connection; this is normal.
  6. Enter your CS account password when prompted.

File Operations

  • WinSCP typically displays a two-pane view: your local computer's files on one side and the remote server's files on the other.
  • Upload: Drag files from your local pane to the remote pane.
  • Download: Drag files from the remote pane to your local pane.
  • Right-click on files or folders for more options like Edit, Rename, Delete, or Create directory.
Connecting with MobaXterm (Windows)

MobaXterm is an enhanced terminal for Windows with built-in X11 server, tabbed SSH client, and network tools, including SFTP.

Installation

  1. Download MobaXterm (usually the "Home Edition" installer) from the official website.
  2. Run the installer and follow the setup steps.

Configuration and Usage

  1. Open MobaXterm.
  2. Start a new session: Click on "Session" (top-left button).
  3. In the "Session settings" window, select "SFTP" as the session type.
  4. Enter the following connection details:

    • Remote host: <sftp_server_address>
    • Specify username: Check this box and enter <your_cs_username>
    • Port: 22

    Understanding Hostname and Username

    • Replace <your_cs_username> with your actual CS student/faculty username.
    • Replace <sftp_server_address> with the URL or IP address of the specific CS server.
  5. Click "OK". You will be prompted for your password.

  6. You can save the password if MobaXterm prompts and you trust the security of your local machine.

File Operations

  • Once connected, MobaXterm opens an SFTP browser in a sidebar or a dedicated tab.
  • This graphical browser allows you to navigate your remote file system.
  • Upload/Download: Drag-and-drop files between your local Windows Explorer and the MobaXterm SFTP browser. You can also right-click for upload/download options.
Connecting from Linux (Command Line)

For Linux systems, SFTP connections can be easily made using the built-in sftp command-line utility. For a more integrated experience, sshfs can mount the remote file system.

Using the sftp Command

  1. Open a terminal window.
  2. Execute the following command:

    sftp <your_cs_username>@<sftp_server_address>
    
    !!! tip "Username and Server Address"

    *   Replace `<your_cs_username>` with your actual CS username.
    *   Replace `<sftp_server_address>` with the server's URL or IP.
    
  3. If it's your first time connecting to this server, you might be asked to verify the host key. Type yes and press Enter.

  4. Enter your CS account password when prompted.

Basic sftp Commands

Once connected, you'll be at an sftp> prompt. Here are some common commands:

  • ls: List files and directories on the remote server.
  • lls: List files and directories on your local machine.
  • cd <directory>: Change directory on the remote server.
  • lcd <directory>: Change directory on your local machine.
  • get <remote_filename>: Download remote_filename to your current local directory.
  • put <local_filename>: Upload local_filename to your current remote directory.
  • mkdir <directory_name>: Create a new directory on the remote server.
  • rm <filename>: Delete a file on the remote server.
  • help: Display a list of available commands.
  • exit or quit: Disconnect from the SFTP session.

Using sshfs (Mounting Remote Filesystem)

sshfs allows you to mount a remote filesystem via SSH, making it appear as a local directory.

  1. Installation (if not already installed):
    sudo apt update # For Debian/Ubuntu
    sudo apt install sshfs
    # For other distributions, use their respective package manager (e.g., yum, dnf, pacman)
    
  2. Create a local mount point (an empty directory):
    mkdir ~/remote_sftp_files
    
  3. Mount the remote filesystem:
    sshfs <your_cs_username>@<sftp_server_address>:/path/to/remote/directory ~/remote_sftp_files
    
    • Replace /path/to/remote/directory with the specific remote path you want to mount (e.g., /home/<your_cs_username> or simply : for your home directory).
  4. Now, you can access the remote files in ~/remote_sftp_files using your regular file manager or command-line tools.
  5. To unmount:
    fusermount -u ~/remote_sftp_files
    

Common Issues and Troubleshooting
  • Connection Timeouts:
    • Verify the SFTP server address (<sftp_server_address>) is correct.
    • Ensure your internet connection is active.
    • Check if a firewall (either on your local machine or network) is blocking outgoing connections on port 22.
    • Confirm the SFTP server is online and accepting connections.
  • Permission Denied / Authentication Failed:
    • Double-check that you are using the correct CS username and password. Passwords are case-sensitive.
    • Ensure your account has SFTP access permissions on the server.
    • If you recently changed your password, make sure you are using the new one.
  • File Transfer Errors (e.g., "Permission denied" during upload/download):
    • Verify you have read permissions for files you are trying to download from the server.
    • Verify you have write permissions for the directory you are trying to upload to on the server.
    • Check if there is sufficient disk space on both your local machine (for downloads) and the remote server (for uploads).
    • Ensure file and directory paths are correct and do not contain invalid characters.
  • Host Key Verification Failed:
    • This can happen if the server's host key has changed (e.g., due to a server rebuild). If you are sure you are connecting to the correct server, you might need to remove the old host key from your client's known_hosts file.
      • WinSCP: It usually prompts you with an option to update the key.
      • Linux/macOS: The error message will often tell you the path to your known_hosts file and the line number to remove (e.g., ~/.ssh/known_hosts).

Still Having Trouble?

If you continue to experience issues, please gather any error messages you see and contact CS Systems Support at root@cs.odu.edu for assistance.